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) ?

  • boards.developerforce.com/t5/General-Development/… Just to help you up i googled this .Loooks like you may use Dataloader for this . – Mohith Shrivastava Nov 23 '12 at 17:31
  • Have you used Ant to retrieve the permission set or did you hand code it? – Mike Chale Nov 23 '12 at 17:43
  • @MohithKumar - You should probably post that as an answer. – Mike Chale Nov 23 '12 at 17:43
  • @MikeChale The Permission set was created through the Web UI and retrieved via ANT, but remains undeployable. – Mike Ginou Nov 26 '12 at 15:33

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="http://soap.sforce.com/2006/04/metadata">

My permission set's XML:

<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <!-- All userPermissions were false; snipped for brevity -->

Perhaps you have some permission that is conflicting?

| improve this answer | |
  • Interesting. I'll try to simplify my scenario to match. – Mike Ginou Nov 26 '12 at 15:49


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

| improve this answer | |
  • This does work, in a pinch. However, you can't upsert on the permission set name, which makes it a real pain (need to do manual id matching between orgs) – Mike Ginou Nov 26 '12 at 15:47

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.



| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.