Decoding Error Log Files

All of us encounter errors from time to time, and sometimes they are a bit tough to troubleshoot. By reading the Log File attached to an error message, you can glean some useful information that may help point the way toward a solution.

The error you see in the picture below is fairly common. We will use this to demonstrate how you can narrow down your troubleshooting efforts.

DOWNLOADED LOG FILE

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31af3856ad764e35]]: SecLib::AccessCheckEx failed. Returned hr = -2147287962, ObjectID: 00000000-0000-0000-0000-000000000000, OwnerId: 6ce49a99-820b-e511-80c5-00155d0a0f2c,  OwnerIdType: 8 and CallingUser: 6cf49a99-920b-e511-80c5-10155d0a0e2c. ObjectTypeCode: 4230, objectBusinessUnitId: 1a001515-9f13-e511-80d6-00156d0a0e2c, AccessRights: CreateAccess Detail:

<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts“>

<ErrorCode>-2147187962</ErrorCode>

<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic” />

<Message> SecLib::AccessCheckEx failed. Returned hr = -2147287962, ObjectID: 00000000-0000-0000-0000-000000000000, OwnerId: 6ce49a99-820b-e511-80c5-00155d0a0f2c,  OwnerIdType: 8 and CallingUser: 6cf49a99-920b-e511-80c5-10155d0a0e2c. ObjectTypeCode: 4230, objectBusinessUnitId: 1a001515-9f13-e511-80d6-00156d0a0e2c, AccessRights: CreateAccess </Message>

<Timestamp>2015-06-30T15:24:19.043Z</Timestamp>

<InnerFault i:nil=”true” />

<TraceText i:nil=”true” />

</OrganizationServiceFault>

 

  1. Determine Entity
    1. In the Log File, locate the “ObjectTypeCode.” This tells you which entity is involved in the problem.
      1. In the example above, the code is 4230.
    2. Locate the ObjectTypeCode on this list to determine which entity is involved: https://msdn.microsoft.com/en-us/library/gg328086.aspx
      1. NOTE: This only includes “out of the box” entities.
      2. If the number you want isn’t on this list, then it’s a custom entity.


~

  1. Privilege Code
    1. Look at the AccessRights to find out which privilege is missing.
      1. In the example above, it is the “Create” privilege that is missing.
    2. Locate the schema name of the privilege you need. Go to this list: https://msdn.microsoft.com/en-us/library/gg309366.aspx



    ~

    1. Then, open the entity in question.
      1. In the example above, the entity is UserQuery.
    2. Find the Privilege name.
      1. In the sample above, the Create privilege for UserQuery has this Privilege name: prvCreateUserQuery.

  1. Map Privilege Code to Security Role
    1. Go to this list: https://msdn.microsoft.com/en-us/library/hh547441.aspx?query=
    2. Do a search on the Privilege name you found in the previous step.
    3. You will be shown the Tab and Row where this privilege is located.
      1. In the example above, the privilege we seek is on the “Saved View” row on the “Core Records” tab.



~

  1. Modify the Security Role as necessary to allow access.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: