Access denied blog Banner

Finding the Entity from the Error Log in Dynamics 365

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: 

Access Is Denied blog1

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: -

Access Is Denied blog4

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:

Access Is Denied blog5

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. 

Access Is Denied blog3

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.

Access Is Denied blog6

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:

Access Is Denied blog2

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.


21 Dec 2017

About the Author

James CTwo is our blogging alter ego for the Dynamics CRM and Web experts here at C2. We have a passion for anything CRM, Web Design or Social Media. We love writing about it! Find us on YouTube & Twitter.

comments powered by Disqus

Our White Papers

Discover the content that matters to you on business transformation. Explore how you can drive customer engagement, empower your team, optimise your businesses and revolutionise your products with the next digital revolution. For more information visit our white paper library.

Library

C2 Newsletter

Our newsletter is sent on a quarterly basis, offering detailed insights into all aspects of business transformation with Microsoft cloud technologies. We also promote upcoming events and special offers throughout the year. Sign up to get involved today.

Dynamics 365 Office 365 Power BI Silver Partner