Search For Privilege Name Using Privilege Id

Quick post on how to search for privilege/permission name using privilege Id. You often in dynamics receive an error like below during your plugins or Web Api requests.:

“user is missing privilege ba09ec92-12c4-4312-ba16-5715c2cbd6da”

looking at the error, its difficult to tell what is the permission missing and on what entity.

Use this approach

All privileges are stored in an entity called privilege : Read more here.
you cannot see this entity in dynamics CRM front-end as its not available however you can easily query this entity using Web Api.

  1. Get web api url of your organization by going to Settings > Customizations > Developer Resources > Web API instance url:

    i.e. https://organizationname.api.crm8.dynamics.com/api/data/v9.1/

  2. Append this url with “privileges?$select=name” and put it in your browser: https://organization.api.crm8.dynamics.com/api/data/v9.1/privileges?$select=name

    1

  3. hit Ctrl+F and search using id:

    1.png

  4. Now we know the id refers to “PrvReadContact”. Go to the security role and assign appropriate read access on contact entity.

    hope this helps!

Advertisement