web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException'

(0) ShareShare
ReportReport
Posted on by 12

Hi Experts,

I'm facing one wired error while opening a custom entity record or creating appointment entity record. The error log says Create Access to 'userentityuisettings' entity which is already there in the security role.

Appreciate your help.

Here is a complete error log -

Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: {"CallerPrincipal":{"PrincipalId":"d9fcedf9-d5ce-e911-a87f-000d3a6a2bab","Type":8,"IsOrganizationPrincipal":false,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"OwnerPrincipal":{"PrincipalId":"d9fcedf9-d5ce-e911-a87f-000d3a6a2bab","Type":8,"IsOrganizationPrincipal":false,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"ObjectId":"00000000-0000-0000-0000-000000000000","ObjectTypeCode":2500,"EntityName":"userentityuisettings","ObjectBusinessUnitId":"26f4d38b-20a5-e511-80f1-c4346bc58784","RightsToCheck":"CreateAccess","RoleAccessRights":"None","PoaAccessRights":"None","HsmAccessRights":"None","Messages":["PrincipalHasOwnerPrincipalWithAtLeastBasicPrivilegeDepth = False","EntityUserGroupRights = None","MinimumPrivilegeDepthRequired = Local","GrantedRights = None","SecLib::AccessCheckEx2 failed. Owner Data: roleCount=10, privilegeCount=290, accessMode=0; Principal Data: roleCount=10, privilegeCount=290, accessMode=0"],"OrganizationId":"6b4bad1e-33dc-40a7-b8fc-1fe940249a73","EntityOwnershipTypeMask":1,"CallerInfo":{"IsSystemUser":false,"IsSupportUser":false,"IsAdministrator":false,"IsCustomizer":false,"IsDisabled":false,"IsIntegrationUser":false,"Teams":null,"Roles":null},"ReadOnlyState":"UserAndOrgFullAccess","IsHsmEnabled":false,"IsOwnerDirectReport":false,"IsDirectReportInOwningTeam":false,"DirectReportInOwningTeam":"00000000-0000-0000-0000-000000000000","IsReadAccessFromIndirectReport":false,"POARightsFromDirectReports":{}}
at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
at Microsoft.Crm.Application.Platform.ServiceCommands.CreateCommand.Execute()
at Microsoft.Crm.Application.Platform.AppFormFilter.SetLastViewedForm(Guid formId)
at Microsoft.Crm.Application.InlineEdit.ReadFormDataBuilder.SetLastViewedXml()
at Microsoft.Crm.Application.Pages.Form.FormDataPage.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #37BD92BBDetail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>d6c6c276-0f78-4181-90f4-cbce37a6017c</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic" />
<HelpLink i:nil="true" />
<Message>System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---&gt; Microsoft.Crm.CrmException: {"CallerPrincipal":{"PrincipalId":"d9fcedf9-d5ce-e911-a87f-000d3a6a2bab","Type":8,"IsOrganizationPrincipal":false,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"OwnerPrincipal":{"PrincipalId":"d9fcedf9-d5ce-e911-a87f-000d3a6a2bab","Type":8,"IsOrganizationPrincipal":false,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"ObjectId":"00000000-0000-0000-0000-000000000000","ObjectTypeCode":2500,"EntityName":"userentityuisettings","ObjectBusinessUnitId":"26f4d38b-20a5-e511-80f1-c4346bc58784","RightsToCheck":"CreateAccess","RoleAccessRights":"None","PoaAccessRights":"None","HsmAccessRights":"None","Messages":["PrincipalHasOwnerPrincipalWithAtLeastBasicPrivilegeDepth = False","EntityUserGroupRights = None","MinimumPrivilegeDepthRequired = Local","GrantedRights = None","SecLib::AccessCheckEx2 failed. Owner Data: roleCount=10, privilegeCount=290, accessMode=0; Principal Data: roleCount=10, privilegeCount=290, accessMode=0"],"OrganizationId":"6b4bad1e-33dc-40a7-b8fc-1fe940249a73","EntityOwnershipTypeMask":1,"CallerInfo":{"IsSystemUser":false,"IsSupportUser":false,"IsAdministrator":false,"IsCustomizer":false,"IsDisabled":false,"IsIntegrationUser":false,"Teams":null,"Roles":null},"ReadOnlyState":"UserAndOrgFullAccess","IsHsmEnabled":false,"IsOwnerDirectReport":false,"IsDirectReportInOwningTeam":false,"DirectReportInOwningTeam":"00000000-0000-0000-0000-000000000000","IsReadAccessFromIndirectReport":false,"POARightsFromDirectReports":{}}
at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
at Microsoft.Crm.Application.Platform.ServiceCommands.CreateCommand.Execute()
at Microsoft.Crm.Application.Platform.AppFormFilter.SetLastViewedForm(Guid formId)
at Microsoft.Crm.Application.InlineEdit.ReadFormDataBuilder.SetLastViewedXml()
at Microsoft.Crm.Application.Pages.Form.FormDataPage.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #37BD92BB</Message>
<Timestamp>2020-07-23T23:15:58.6769285Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>d6c6c276-0f78-4181-90f4-cbce37a6017c</ActivityId>
<ErrorCode>-2147187962</ErrorCode>
<ErrorDetails xmlns:d3p1="">schemas.datacontract.org/.../System.Collections.Generic" />
<HelpLink i:nil="true" />
<Message>{"CallerPrincipal":{"PrincipalId":"d9fcedf9-d5ce-e911-a87f-000d3a6a2bab","Type":8,"IsOrganizationPrincipal":false,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"OwnerPrincipal":{"PrincipalId":"d9fcedf9-d5ce-e911-a87f-000d3a6a2bab","Type":8,"IsOrganizationPrincipal":false,"IsUserPrincipal":true,"IsTeamPrincipal":false,"TypeName":"user"},"ObjectId":"00000000-0000-0000-0000-000000000000","ObjectTypeCode":2500,"EntityName":"userentityuisettings","ObjectBusinessUnitId":"26f4d38b-20a5-e511-80f1-c4346bc58784","RightsToCheck":"CreateAccess","RoleAccessRights":"None","PoaAccessRights":"None","HsmAccessRights":"None","Messages":["PrincipalHasOwnerPrincipalWithAtLeastBasicPrivilegeDepth = False","EntityUserGroupRights = None","MinimumPrivilegeDepthRequired = Local","GrantedRights = None","SecLib::AccessCheckEx2 failed. Owner Data: roleCount=10, privilegeCount=290, accessMode=0; Principal Data: roleCount=10, privilegeCount=290, accessMode=0"],"OrganizationId":"6b4bad1e-33dc-40a7-b8fc-1fe940249a73","EntityOwnershipTypeMask":1,"CallerInfo":{"IsSystemUser":false,"IsSupportUser":false,"IsAdministrator":false,"IsCustomizer":false,"IsDisabled":false,"IsIntegrationUser":false,"Teams":null,"Roles":null},"ReadOnlyState":"UserAndOrgFullAccess","IsHsmEnabled":false,"IsOwnerDirectReport":false,"IsDirectReportInOwningTeam":false,"DirectReportInOwningTeam":"00000000-0000-0000-0000-000000000000","IsReadAccessFromIndirectReport":false,"POARightsFromDirectReports":{}}</Message>
<Timestamp>2020-07-23T23:15:58.6769285Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>

pastedimage1596082957432v1.png

Thanks

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException'

    11

    Turns out my code was not extracting the InnerException of that HttpUnhandledException. I've grabbed IIS sources (yes, they can be officially downloaded) and found that System.Web.UI.Page.HandleError(Exception e) throws HttpUnhandledException and passes e into its constructor. I expect that InnerException of HttpUnhandledException turns out useful.

  • Suggested answer
    Susana Carneiro Profile Picture
    on at
    RE: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException'

    Hello Monali,

    Since the User Entity UI settings can only be set as None or User in security roles, we would like to suggest you to raise a service request with Dynamics 365 support team here admin.powerplatform.microsoft.com. We need to investigate where the exception is coming from.

    Please refer this thread on the case.

    Thank you.

  • Monali Chavan Profile Picture
    12 on at
    RE: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException'

    Hi Bipin,

    Thanks for your help.

    The issue is 'User Entity UI settings'  entity in security role only allows to change security role to 'user level' or None, we can't change the access level to business unit level or Organisation level.

    Thanks

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at
    RE: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException'

    Hi,

    Please change access to Business Unit level from User level.

    Local is nothing but Business unit Level

    See below docs for your reference.

    docs.microsoft.com/.../security-roles-privileges

    If found helpful, Please mark my answer verified.

  • Monali Chavan Profile Picture
    12 on at
    RE: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException'

    Hi Susana,

    Thank you for your quick response.

    As you suggested the security role need 'Local' instead of 'Basic' level of access; however Dynamics CRM only allows 'Basic' level of access for 'User Entity UI settings' entity. There is no option to apply 'Local' access for this entity.

    Could you please help me with more details how can I update the security role to 'Local' for the entity 'userentityuisettings '

    Highly appreciate your help.

    Thanks

  • Suggested answer
    Susana Carneiro Profile Picture
    on at
    RE: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException'

    Hello Monali,

    Looking at the stack trace we could see that the system is trying to check the create access of the user for the entity userentityuisettings  and that the MinimumPrivilegeDepthRequired is Local:

    pastedimage1596198969295v2.png

    Looking at your screenshot we could see that the user has Basic access to create records for this entity, please refer to https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/admin/security-roles-privileges

    pastedimage1596199314453v4.png pastedimage1596199362575v5.png

    So to allow this user to opening a custom entity record or creating appointment entity record the create/read access level needs to be set as Local instead of Basic:

    pastedimage1596199402250v6.png

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 182

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 129 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans