About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
The error reads "Error AADSTS50105 - The signed in user is not assigned to a role for the application." It means the enterprise application has Assignment required? set to Yes, and the person signing in has no assignment to it. The fix is either to assign the user, or a group that the user is a direct member of, or to switch the requirement off if the app should be open to everyone in the tenant.
Decide which you want before you click anything. The setting exists to keep an application restricted to named people.
What the error means
Microsoft's page states the cause plainly: "The enterprise application's service principal has Assignment required? set to Yes, and the requesting user doesn't have an app role assignment to the application."
A user can satisfy the requirement in two ways:
- The user is assigned directly to the application.
- A group is assigned to the application, and the user is a direct member of that group.
An assignment to Default Access satisfies the requirement when the application does not expose a named application role. Default Access does not add a roles claim to the token. The page also gives two cautions. For predictable access, "don't rely on nested group membership". And the assignment requirement "doesn't apply to Global Administrators", so a Global Administrator can sign in without an assignment, which makes a test with an administrator account misleading.
Microsoft's assignment page adds that a group assignment does not cascade to nested groups, and that group-based assignment requires Microsoft Entra ID P1 or P2. Check the current licensing text before relying on that for a purchase.
The restriction is not tied to one kind of application. The restrict-to-users page says the option works with applications configured for federated single sign-on with SAML-based authentication, Application Proxy applications that use Microsoft Entra preauthentication, and applications built on the Microsoft Entra application platform that use OAuth 2.0 or OpenID Connect after a user or admin has consented. So the same error can appear for a payroll system on SAML and for an in-house web app on OpenID Connect.
The account that changes the settings needs a role that can update the enterprise application's properties and app role assignments, such as Cloud Application Administrator or Application Administrator, or ownership of the service principal. A user who can sign in to the portal but holds none of these can find the application and still be unable to fix it.
The Microsoft Entra error-code reference lists the same error as "EntitlementGrantsNotFound - The signed in user isn't assigned to a role for the signed in app. Assign the user to the app." A related code, AADSTS501051, covers an app-only assignment failure; the error page for AADSTS50105 points to the restrict-app page for it, so it is not covered here.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| The user has no assignment at all | Error for this user; colleagues who are assigned sign in | Users and groups on the enterprise application does not list the user or any group they belong to |
| The user is in a group that is assigned only as a nested group | A group appears in the list, the user is a member of a group inside it, and the error remains | The user is not a direct member of any assigned group |
| Assignment was granted to a group, but the tenant has no P1 or P2 licence for group-based assignment | Group assignment cannot be relied on | Entra edition in the tenant against the licence statement on the assignment page |
| The administrator testing is a Global Administrator | "It works for me" while users fail | Test with an ordinary account that has the same assignment as the affected user |
Prove the cause before changing anything
All of these only read.
- Sign in to the Microsoft Entra admin center as an account that can see enterprise applications, such as a Cloud Application Administrator or Application Administrator.
- Browse to Entra ID > Enterprise apps > All applications and select the application. Select Properties and read Assignment required?. Write the value down, and ask whoever administers the application whether the setting was changed recently.
- Select Users and groups. Look for the affected user, then for each group the user belongs to.
- In the sign-in log (Entra ID > Monitoring & health > Sign-in logs), find the failed event for the user and the application. Note the time and correlation ID.
- If the tenant uses Microsoft Entra PowerShell, you can list assignments for the service principal. This is read-only:
connect-entra -scopes "Application.ReadWrite.All", "AppRoleAssignment.ReadWrite.All"
$user = Get-Entrauser -ObjectId "<objectId>"
$spo = Get-EntraServicePrincipal -ObjectId "<objectId>"
$assignments = Get-EntraServicePrincipalAppRoleAssignedTo -ObjectId $spo.ObjectId | Where {$_.PrincipalDisplayName -eq $user.DisplayName}
$assignments | Select *
These lines come from the unassign section of Microsoft's assignment page. Its connect-entra line requests write scopes, so use an account and a session you are content to give that permission; the lines above only list assignments and change nothing.
Example (illustrative): at Contoso (contoso.com.au), the "HR Portal" enterprise application has Assignment required? set to Yes. The group HR-Staff is assigned. Priya Nair is a member of HR-Managers, and HR-Managers is a member of HR-Staff. She receives AADSTS50105. She is a member of a group inside the assigned group, not a direct member. Contoso adds her to HR-Staff directly, then asks her to sign in again.
Fix
Pick the path that matches the intended access policy. The choice is between three outcomes:
- Assign the person (or a direct-member group): the restriction stays, and one more name has access. This suits an application that is meant to be restricted.
- Add the person to a group that is already assigned and that they should belong to: the restriction stays and the group owner keeps control. This needs P1 or P2 for group-based assignment.
- Switch the requirement off: everyone in the tenant who is otherwise authorised can reach the application. This suits an application that was never meant to be restricted, and should not be used to clear one user's error on a restricted one.
Risk: assigning a user or group to the application grants access. Check with the application owner first. Save first by recording the current list under Users and groups. To back out, select the user or group on that pane and select Remove.
- In the enterprise application, select Users and groups, then Add user/group.
- Select the user, or a group the user belongs to directly.
- Select an application role. If the application does not expose a named role, select Default Access.
- Select Assign.
Risk: adding a person to a group grants every right the group holds, not only access to this application. Save first: record the group's current member list. Use your usual group-management procedure. Add the person to the assigned group itself, not to a group nested inside it, because the requirement is met by direct membership. Back-out: remove the person from that group using the same procedure, which also removes everything else the group gave them.
Disruptive step: setting Assignment required? to No. This removes the assignment check for the application. Microsoft's page says it "broadens token eligibility to include unassigned users and applications" and that other controls, such as Conditional Access policies and application-specific authorisation, still apply. Save first: record that the value was Yes. Back-out: set Assignment required? to Yes and select Save. Note that the restrict-to-users page says that when an application requires assignment, user consent for it is not allowed, so grant tenant-wide admin consent before switching the requirement back on. Do this only if it matches your organisation's intended access policy.
Do not use a Global Administrator to check the change.
Confirm the fix
- Ask the affected user to sign out and try again from a new private browser window. Check the sign-in log for a Success event.
- Test with the affected user's own account. Microsoft's page says not to use a Global Administrator for verification because the requirement does not apply to that role.
- If you assigned a group, confirm the user's membership is direct, not through another group.
- Check a second user who should not have access and confirm they are still refused, if you kept the requirement on.
What to watch afterwards
- New joiners: who adds them to the assigned group, and when.
- Group changes that move people into nested groups. They look correct in the group tree but still fail the requirement.
- Applications with Assignment required? set to No that should be restricted. The setting's effect is invisible until someone unassigned signs in.
- Roles on the application. An assignment to Default Access satisfies the requirement only when the application exposes no named role, and it does not add a roles claim.
Read next
Related articles you may want next.
- TroubleshootingAADSTS53003: Access has been blocked by Conditional Access policies — finding which policy blocked the sign-inAADSTS53003 BlockedByConditionalAccess: read the Entra sign-in log, find the policy that blocked the user, test with What If and change it safely.Read article
- TroubleshootingAADSTS50011: The reply URL specified in the request does not match — after a hosted application moves addressAADSTS50011 reply URL or redirect URI mismatch after moving an app to a new address: read the URI in the error, add it exactly and test.Read article
- TroubleshootingAADSTS7000222: 'The provided client secret keys are expired' when a server application stops signing inAADSTS7000222 client secret keys are expired: confirm the end date, add a new secret or certificate to the app registration and roll it over safely.Read article
Risks and limits
- These commands have not been run or lab-tested.
- The Entra PowerShell lines run against the tenant; the user and service principal object IDs are placeholders you must replace.
- Microsoft's error page gives no time for a new group membership to take effect; if the first retry still fails, wait and try again before changing anything else.
- Group-based assignment needs Microsoft Entra ID P1 or P2 according to the assignment page; check the current page and your licence.
- Removing an assignment stops that user's access; confirm with the application owner first.
Sources
- Error AADSTS50105 - The signed-in user isn't assigned to a role for the application — Microsoft Learn, page dated 2026-08-20, accessed 20 November 2026
- Microsoft Entra authentication and authorization error codes — Microsoft Learn, page dated 2025-02-03, accessed 20 November 2026
- Restrict a Microsoft Entra app to a set of users — Microsoft Learn, page dated 2025-07-08, accessed 20 November 2026
- Manage users and groups assignment to an application — Microsoft Learn, page dated 2026-04-01, accessed 20 November 2026
- Troubleshoot sign-in problems with Conditional Access — Microsoft Learn, page dated 2026-03-24, accessed 20 November 2026
This article was originally published on .