"You can't sign in here with a personal account. Use your work or school account instead" when trying to access Dynamics CRM api – C#

by
Ali Hasan
azure-active-directory c# dynamics-crm microsoft-dynamics

Quick Fix: When encountering the error "You can’t sign in here with a personal account. Use your work or school account instead" while trying to access Dynamics CRM API, it’s essential to understand that Dynamics CRM is designed for business use, requiring work or school accounts associated with Azure AD tenants. Personal Microsoft accounts are not typically linked to Azure AD tenants, lacking the necessary security and control. To resolve the issue, use a work or school account to sign in and generate an access token for API access.

The Problem:

A user is attempting to use a personal account to sign in to the Dynamics CRM API, but is receiving an error message stating that they cannot sign in with a personal account and must use a work or school account instead. The user has already tried setting the Supported account types to All Microsoft account users and changing the signInAudience in the Manifest file to "AzureADandPersonalMicrosoftAccount", but the issue persists. The user is following the code provided in the documentation, but is still unable to sign in with a personal account.

The Solutions:

Solution 1: Dynamics CRM API requires work or school accounts

Dynamics CRM API is designed for business or enterprise use, which requires users to have work or school accounts associated with an Azure AD tenant. Personal Microsoft accounts are not typically linked to an Azure AD tenant and lack the same level of security and control. As a result, Dynamics CRM restricts access to work or school accounts to prevent unauthorized access and protect sensitive data. If you encounter the error message “You can’t sign in here with a personal account,” it indicates that you must use a work or school account to access the Dynamics CRM API.

  • Ensure that the user attempting to access the API has a valid work or school account associated with an Azure AD tenant.
  • Double-check the application manifest settings to verify that the signInAudience is set to allow for work or school accounts.
  • Make sure that the required permissions for the Dynamics CRM API have been granted to the application.

By following these steps, you can ensure that the user has the necessary credentials and permissions to access the Dynamics CRM API using a work or school account.

Q&A

Is it possible to use personal Microsoft account with Dynamics CRM API?

No, Dynamics CRM API is part of Azure AD which is used in a business context, it allows only work or school accounts that are associated with an Azure AD tenant.

Why can’t personal Microsoft accounts access Dynamics CRM?

Personal Microsoft accounts are not linked to an Azure AD tenant and lack the same level of security and control as work or school accounts, which is why they cannot access Dynamics CRM.