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 :
Microsoft Dynamics CRM (Archived)

CRM Exception: The user Id is invalid.

(0) ShareShare
ReportReport
Posted on by 1,290

Hello,

The scenario is the server is up and running fine but when i try to access the CRM URL and then specify the admin credentials, the CRM page loads fine.

But when i try giving my personal credential, the CRM page returns me the error saying "The user Id is invalid."

The identity of CRMAppPool is set to Network Service. I have added the CRM server name in following groups in AD:

PrivUserGroup

SQLAccessGroup

PrivReportingGroup

ReportingGroup

UserGroup

Also can anyone please tell me if there are multiple organization is setup how can i find the PrivUserGroup for CRM server which i am error with?

Thanks in advance,

Durgesh

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at
    RE: CRM Exception: The user Id is invalid.

    In Active directory you can find PrivUserGroup {GUID}. This GUID is your organization id.

    so if you have multiple organizations then might be multiple privUserGroups

    Here are some more details on these groups

    debajitcrm.wordpress.com/.../retrieve-privusergroup-specific-to-your-crm-organization-in-microsoft-dynamics-crm

    rajeevpentyala.wordpress.com/.../privusergroup

    groups.google.com/forum

    msdn.microsoft.com/.../gg197630(v=crm.6).aspx

    Hope this will help..

  • Durgesh Profile Picture
    1,290 on at
    RE: CRM Exception: The user Id is invalid.

    Hey Mahadeo,

    Thank you so much for your quick response. I am currently going through the links you have sent me and verifying my AD settings. I will get back to you if this gets my issue resolved.

    Thanks again,

    Durgesh

  • Durgesh Profile Picture
    1,290 on at
    RE: CRM Exception: The user Id is invalid.

    Hey Mahadeo,

    I have verified that the server name have been added in all the specified group.

    Is there something else that i should keep in mind?

    Actually i was able to successfully login with the server admin account itself but i am not able to login with my personal account in AD.

    Thanks,

    Durgesh

  • Bas van de Sande Profile Picture
    4,383 on at
    RE: CRM Exception: The user Id is invalid.

    Strange problem. In case you are able to access CRM and it's data the installation seems to be fine. I think the devil may be in the details. You mention that the CRMAppPool is set to Network Service. Is the SQL Server instance running on the same server?  If the SQL Server is on another instance you might be in problems, as the Network service account is a local account and not an AD account.

    The reason why CRM probably works when running under the admin credentials is that the admin is probably member of the domain admins group.  I would take a look at the service accounts in the fist place.

    I hope this will help you a bit further.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: CRM Exception: The user Id is invalid.

    Hi Durgesh,

    I had a similar issue with an on-premise CRM.

    I spent weeks trying to figure out how to resolve this with little success.

    I latter realised there had been a modification of the user account.

    I was able to resolve this by re-mapping the user account.

    log in as an administrator.

    change the user ID to something different.

    In my case I changed the domain

    EG contoso\james.smith  was changed to tailspin\james.smith

    I then saved the user account .

    Then changed it back to the original user ID.

    This resolved it.

    Let me know if this works for you

  • Durgesh Profile Picture
    1,290 on at
    RE: CRM Exception: The user Id is invalid.

    Hey Hakim,

    Thank you so much for your response even i think that we have the same problem but i did not went ahead and checked it as now we just upgraded our CRM to 2013 and not using 2011 anymore.

    Thanks again,

    Durgesh

  • Durgesh Profile Picture
    1,290 on at
    RE: CRM Exception: The user Id is invalid.

    Hey  Bas,

    The SQL Server instance is running on the same server.

    Thanks,

    Durgesh

  • Vipin J Profile Picture
    1,603 on at
    RE: CRM Exception: The user Id is invalid.

    Hi Durgesh,

    Were you able to solve your problem you posted ?

    I am experiencing similar problem

    Here is my scenario.

    CRM and SQL both installed on the same server.

    CRM App Pool is on Network Service Account.

    I am able to browse CRM.

    I have a custom application which get called within CRM.

    APP Pool for custom application is also Network Service Account, If I changed it to any other I m unable to load it within CRM.

    But when service.create() or service.update operation get triggered within my custom application, I get an error.

    Going thru CRM trace I found this log about The user Id is invalid.

    Any Help on this ?

    >Crm Exception: Message: The user Id is invalid., ErrorCode: -2147214049
    [2016-06-30 13:09:15.480] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 39 |Category: Platform.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 68229480-0607-49e9-8cc1-64664b46f693 | ServiceModelTraceRedirector.TraceData ilOffset = 0x45
    >msdn.microsoft.com/.../System.ServiceModel.Diagnostics.TraceHandledException.aspxHandling an exception. Exception details: Microsoft.Crm.CrmException: The user Id is invalid.
    > at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetPrivilegedUserCallerAndBusinessGuidsFromThread(WindowsIdentity identity, IOrganizationContext context)
    > at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId, LocatorServiceContext locatorServiceContext)
    > at Microsoft.Crm.Authentication.UserManagementFactory.ValidateSpecialUser(WindowsIdentity identity, Guid organizationId)
    > at Microsoft.Crm.Authentication.WindowsIdentityAuthorizationManager.Authenticate(OperationContext operationContext)
    > at Microsoft.Crm.Authentication.WindowsIdentityAuthorizationManager.CheckAccessCore(OperationContext operationContext)
    > at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc& rpc)
    > at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
    > at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)/LM/W3SVC/2/ROOT-1-131117750661423398Microsoft.Crm.CrmException, Microsoft.Crm.Core, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35The user Id is invalid. at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetPrivilegedUserCallerAndBusinessGuidsFromThread(WindowsIdentity identity, IOrganizationContext context)
    > at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId, LocatorServiceContext locatorServiceContext)
    > at Microsoft.Crm.Authentication.UserManagementFactory.ValidateSpecialUser(WindowsIdentity identity, Guid organizationId)
    > at Microsoft.Crm.Authentication.WindowsIdentityAuthorizationManager.Authenticate(OperationContext operationContext)
    > at Microsoft.Crm.Authentication.WindowsIdentityAuthorizationManager.CheckAccessCore(OperationContext operationContext)
    > at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc& rpc)
    > at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
    > at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)Microsoft.Crm.CrmException: The user Id is invalid.
    > at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetPrivilegedUserCallerAndBusinessGuidsFromThread(WindowsIdentity identity, IOrganizationContext context)
    > at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId, LocatorServiceContext locatorServiceContext)
    > at Microsoft.Crm.Authentication.UserManagementFactory.ValidateSpecialUser(WindowsIdentity identity, Guid organizationId)
    > at Microsoft.Crm.Authentication.WindowsIdentityAuthorizationManager.Authenticate(OperationContext operationContext)
    > at Microsoft.Crm.Authentication.WindowsIdentityAuthorizationManager.CheckAccessCore(OperationContext operationContext)
    > at System.ServiceModel.Dispatcher.AuthorizationBehavior.Authorize(MessageRpc& rpc)
    > at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
    > at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

  • BradC Profile Picture
    20 on at
    RE: CRM Exception: The user Id is invalid.

    Hakim's Solution worked for me too.

    Slight difference, I had to change the user to another existing Active Directory User, then change it back.  (Service account that doesn't use CRM

    Many Thanks Hakim

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans