Back to Blog Listing
When working in Dynamics 365, you may encounter an access denied error if you don't have the required permissions. In these circumstances you will see an error message like the one below:

For end users who are not familiar with technical errors the solution may not be immediately obvious. The following steps should identify the exact permission that is causing the error. You will require an administrator with appropriate permissions to update the relevant permissions.
First click on “Download Log File” which will present a file similar to the following: -

At a glance it may look complex but we only need to concentrate on “ObjectTypeCode” and “AccessRights” as highlighted in the above example (AccessRights – In this example refers to AppendToAccess). This relates to the permission type of an Entity which you may be familiar with the Security Role layout shown below:

Once you have located the access rights, in this case it's “AppendingToAccess” you will then need to find the Object Type to locate the entity in question. In this example the “ObjectTypeCode” is 3. We next need to identify which entity is the number is a reference for. To find this you will need to look through the Entity Type Code List from Dynamics 365. In this example the number ID: 3 refers to an Opportunity entity.

Now that you know you don’t have the right permissions to create an opportunity, you can now contact your administrator to grant the right permissions.
Custom Entity
Although in the example above the entity was a Core Entity, potentially the entity could have been a custom entity. Custom entities are slightly more complicated to find due to not having a list to guide you to the object type, but there is a way to find this. To do this you will need to put a WEB API query in the address bar through the Service Root URL. Finding the Service Root URL you will need to navigate to the “Developer’s Resources Area” in Dynamics 365 Settings > Customisations > Developers Resources.

As shown in the image above, you will see the Service Root URL. Open a new tab in your browser and copy and paste the Service Root URL and include this API query code EntityDefinitions?$select=ObjectTypeCode,LogicalName – lastly, add the ObjectTypeCode from the Log to have the following:
https://your_company.api.crm4.dynamics.com/api/data/v8.2/EntityDefinitions$select=ObjectTypeCode,LogicalName&$filter=ObjectTypeCode eq 1072
Entering the URL in the new tab will provide the enquiry in question as shown below, in this example we have identified that we don’t have the permission rights to create a subscription record in C2’s membership management solution:

Contact Us today for more information on finding entity definitions from error logs within Dynamics 365, alternatively you find more technical content in C2’s eLearning Hub.