Find your content:

Search form

You are here

Can't deploy org-wide permission set with ant


I have created an org-wide permission set (i.e. not tied to a specific User License type) and am trying to deploy the permission set using ant (I just downloaded the latest .jar file, 26.0) but I'm getting the following error:

Permission set must be associated to a user license

Is this because the salesforce ant library doesn't support org-wide permission sets or am I doing something wrong on my side (i.e. does anyone have a counter example of this working) ?

Attribution to: Mike Ginou

Possible Suggestion/Solution #1

There shouldn't be a reason why you can't deploy an org-wide permission set through ANT.

Make sure that:

  1. the user license element is left off the [org-wide] .PermissionSet xml altogether (no need to set <userLicense> and in fact, by adding an empty element: <userLicense></userLicense>, you will receive an error: Required field is missing: userLicense which may be interpreted in ANT as "Permission set must be associated to a user license"

  2. make sure that, if updating an existing org-wide permission set in the target org, that it's not already assigned to a user where you would encounter a validation issue with a permission that the assigned user shouldn't have (e.g. platform users can't be assigned delete on opportunities or the assignment will fail).

If you are still encountering a problem, please file a case with Customer Support and reference this stackexchange thread so that I can address it when the case is escalated to my team in salesforce R&D.



Attribution to: Adam Torman

Possible Suggestion/Solution #2

You can use the dataloader to achieve this .You can extract in a CSV and use this to upload .

Attribution to: Mohith Shrivastava

Possible Suggestion/Solution #3

I have not been able to replicate this error. In a dev org I created an empty Permission Set with the User License set to none. I then retrieved it via Ant, deleted it from the org via the UI and then deployed it back via Ant.

My package.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="">

My permission set's XML:

<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="">
    <!-- All userPermissions were false; snipped for brevity -->

Perhaps you have some permission that is conflicting?

Attribution to: Mike Chale
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content