Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | AADSTS50105: The signed-in user is not assigned to a role for the application '<app-id>' | Entra admin center sign-in logs | -> |
| User assignment required setting | Yes | Enterprise applications > <app> > Properties | -> |
| Registry key involved | HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureAD | Windows Registry | -> |
| Relevant service/endpoint URL | https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token | API Endpoint | -> |
| Log line signature | AADSTS50105: The signed-in user is not assigned to a role for the application '<app-id>' | Entra admin center sign-in logs | -> |
Log Files to Check
C:\ProgramData\Microsoft\IdentityManager\Logs\idaudit.logC:\inetpub\logs\LogFiles\W3SVC1
What This Error Actually Means
The error code AADSTS50105 signifies that a user attempting to sign into an Azure AD application is missing the necessary role assignment required for access. This restriction is enforced by Entra ID, which checks if the signed-in user has been explicitly assigned to use the specified application or belongs to a group that has been granted permission. The error message "AADSTS50105: The signed-in user is not assigned to a role for the application 'Affected Versions and Scope
This error affects all versions of Azure AD and Entra ID where User Assignment is required for an application. The setting "User assignment required" must be enabled in the Enterprise Application settings within Entra ID, which restricts sign-in to only those users who have been explicitly assigned roles or groups with access rights. This configuration does not apply to applications that do not enforce user assignments; hence, if this error is encountered on an application without such a requirement, it would indicate either misconfiguration or a different issue altogether.Where To Look First: Logs and Event IDs
To diagnose AADSTS50105 errors, start by examining the sign-in logs in Entra ID. These logs are located atC:\ProgramData\Microsoft\IdentityManager\Logs\idaudit.log. The exact log line to grep for is "AADSTS50105: The signed-in user is not assigned to a role for the application 'C:\inetpub\logs\LogFiles\W3SVC1 for any related entries. Event IDs 4726 and 4728 can also provide useful context regarding user authentication attempts and failures.
Root Causes
User Not Assigned to the Application or Group
When a user is not assigned directly to an application or does not belong to any group that has been granted access, they will encounter AADSTS50105. This can be identified by checking if the user appears in the list of users and groups associated with the application.Role Assignment Removed During Offboarding
If a user's role assignment was inadvertently removed during an offboarding process but not restored, they will face this error when trying to access the application. Reviewing the history of changes within Entra ID can help identify such cases.SAML SSO App with Incorrect Claim Mapping
For applications using SAML Single Sign-On (SSO), users must be part of a specific claim-mapping group defined in the IdP configuration. If this mapping is incorrect or missing, users will receive AADSTS50105.Fix Procedure
- Check User Assignment: Navigate to Entra admin center > Applications > Enterprise applications >
> Users and groups — verify the user appears in the list. - Verify Assignment Requirement: Go to Entra admin center > Applications > Enterprise applications >
> Properties — confirm 'Assignment required?' is set to Yes. - In PowerShell, Check Assignment: Run
(Get-AzureADServiceAppRoleAssignment -ObjectId (Get-AzureADServicePrincipal -Filter "DisplayName eq '.'").ObjectId | Where-Object PrincipalDisplayName -eq ' ').Id - Check for Group-Based Assignment: Execute
Get-AzureADGroupMember -ObjectId.| Where-Object DisplayName -eq ' ' - Review Conditional Access Policy: Check Entra admin center > Protection > Conditional Access — filter by the application to see if a policy is excluding the user.
- Assign User or Group to Application: In Entra admin center, go to Applications > Enterprise applications >
> Users and groups > Add user/group — select the user and app role (Default Access). - Assign via PowerShell: Use
New-AzureADUserAppRoleAssignment -ObjectId.-PrincipalId -ResourceId -Id (Get-AzureADServiceAppRoleAssignment -ObjectId | Select-Object -First 1).Id - Bulk Assignment: Assign a group instead: Entra admin center > Applications > Enterprise applications >
> Users and groups > Add user/group > select a security group. - Disable Assignment Requirement (if appropriate): Navigate to Entra admin center > Applications > Enterprise applications >
> Properties > Assignment required? = No — all users in the tenant can sign in.
Disabling user assignment requirements may expose your application to unauthorized access. Ensure this is a necessary step for your security policy.
Error Code Variants
| Code | Description | Distinguishing Factors |
|---|---|---|
| AADSTS50104 | User is not a member of the required group. | This error occurs when a user needs to be part of a specific security group for access, but they are missing that membership. |
| AADSTS50126 | Invalid username or password. | Different from AADSTS50105 as it indicates authentication failure rather than authorization issues. |
Verification
After applying the fix, verify that the user can now access the application without encountering AADSTS50105. Check the sign-in logs for successful entries and ensure there are no further errors inC:\ProgramData\Microsoft\IdentityManager\Logs\idaudit.log. Additionally, confirm that the 'Assignment required?' setting is correctly configured for the application.
Prevention
To prevent recurrence of AADSTS50105, ensure proper management and documentation of user assignments and group memberships. Implement automated scripts or policies to maintain role assignments during onboarding and offboarding processes. Regularly review and update conditional access policies to align with current security requirements.Use
This guide provides a comprehensive approach to diagnosing and resolving AADSTS50105 errors in Entra ID, ensuring that users have the necessary permissions to access enterprise applications securely.Get-WinEvent -LogName "Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin" -MaxEvents 50 for quick diagnostics of recent authentication attempts.