AADSTS54000 “Legal Age Group Requirement” Sign-in Error

Microsoft Entra ID logo

Short answer: AADSTS54000 means Microsoft Entra ID thinks the person signing in is a minor who does not have parental consent, so it refuses to sign them in to OneDrive, Outlook and other apps. For an adult staff member this is a wrong setting on their account. A Microsoft 365 administrator can fix it in minutes by clearing the Age group and Consent provided for minor fields in the user’s Parental controls properties.

A vehicle dealership contacted us because one of their staff could not get into Outlook or OneDrive on her work PC. Her account was verified and her password was correct, but every sign-in ended with “Sorry, but we’re having trouble signing you in” and an AADSTS54000 code mentioning a “Legal Age Group Requirement”. Removing her saved Microsoft 365 credentials from Windows Credential Manager made no difference. When we opened her account in the Microsoft Entra admin center, her age group was set to Minor with parental consent denied, which tells Microsoft to block an adult employee like a child. Here is what we found and how to fix it.

Fixed by Kenn Cruz, IT Support Specialist at GCIT. Written up by Elliot Munro, CISO.

Symptoms

When the user signs in to OneDrive, Outlook, Teams or another Microsoft 365 app, the Microsoft sign-in window shows:

Sorry, but we’re having trouble signing you in.

AADSTS54000: User is not allowed to access application OneDrive SyncEngine due to Legal Age Group Requirement of application OfficeServicesManager.

Microsoft OneDrive sign-in error: Sorry, but we're having trouble signing you in. AADSTS54000: User is not allowed to access application OneDrive SyncEngine due to Legal Age Group Requirement

The application names change depending on what the user is opening. In the same session we saw the error for other apps, for example “User is not allowed to access application [app name] due to Legal Age Group Requirement of application Microsoft Graph”. Outlook may only show a generic Error window with “Message: Access denied for the resource.” in its troubleshooting details.

In our case the Outlook panel read:

Message: Access denied for the resource.

Code: 3399614466

That code is a generic resource-access denial, so it does not prove an age-group problem on its own. It is worth checking Parental controls when it turns up alongside AADSTS54000 in other apps, as it did here. Once the age group was cleared, the same user signed in to Outlook, OneDrive, Teams and Edge.

Other signs:

  • The password is correct, MFA works and the account is not blocked or disabled.
  • Clearing cached credentials, signing out or reinstalling Office does not help.
  • Other staff in the same organisation sign in normally.
  • The Entra sign-in logs show failure code 54000 for the user.

People search for this as “AADSTS54000”, “legal age group requirement Microsoft 365”, “user is not allowed to access application due to legal age group requirement”, “OneDrive SyncEngine legal age group” or “Microsoft 365 thinks my user is a minor”.

Affected Software

  • Application: Microsoft Entra ID (formerly Azure Active Directory) sign-in for OneDrive, Outlook, Teams, Edge profiles and other Microsoft 365 apps
  • Platform: Windows, macOS, web and mobile. The error comes from Microsoft’s sign-in service, so every device is affected.
  • Related Services: User properties in the Microsoft Entra admin center (Parental controls section)

Cause

Every Microsoft Entra user account has two parental control properties:

  • Age group: blank, Minor, Not adult or Adult
  • Consent provided for minor: blank, Granted, Denied or Not required

These exist so schools and organisations that serve young people can meet legal age requirements. Microsoft’s internal name for this error is MinorUserBlockedLegalAgeGroupRule. When an account is marked as a Minor and consent has been denied or is still required, Entra ID will not issue sign-in tokens for many Microsoft apps, and the user sees AADSTS54000.

For a normal adult employee these fields should simply be blank. In our case the age group had been set to Minor with consent denied, which is why only this one person was affected. These values can be set by mistake when an account is edited by hand, created from a template, or imported with a bulk tool or HR integration that maps the wrong field.

Resolution

Fix it in the Microsoft Entra admin center

  1. Sign in to the Microsoft Entra admin center as at least a User Administrator.
  2. Go to Entra ID > Users > All users and select the affected user.
  3. Select Properties, then Edit properties, and open the Parental controls tab.
  4. Check Age group and Consent provided for minor. If the age group shows Minor (or Not adult) for an adult employee, that is the cause.

Microsoft Entra admin center user properties, Parental controls tab showing Age group Minor and Consent provided for minor Denied

  1. Set both fields back to blank (None), or set Age group to Adult if your organisation records it. Select Save.
  2. Ask the user to close the app, sign in again and approve any MFA prompt. In our case OneDrive, Outlook, Teams and Edge all signed in straight away. Allow a few minutes if it still fails first time.
  3. If the error persists, remove the old work account from Settings > Accounts > Access work or school only if your IT team confirms it is safe to do so (it can affect device management), then sign in again.

Check or fix it with Microsoft Graph PowerShell

To find every account in a tenant with an age group set, connect with Connect-MgGraph -Scopes "User.ReadWrite.All" and run:

Get-MgUser -All -Property DisplayName,UserPrincipalName,AgeGroup,ConsentProvidedForMinor |
  Where-Object { $_.AgeGroup } |
  Select-Object DisplayName,UserPrincipalName,AgeGroup,ConsentProvidedForMinor

To clear both values for one adult user (replace the address):

Invoke-MgGraphRequest -Method PATCH -Uri "https://graph.microsoft.com/v1.0/users/user@example.com.au" -Body @{
  ageGroup = $null
  consentProvidedForMinor = $null
}

Important Notes

  • This is not a licence or password problem. Resetting the password, reassigning licences or rebuilding the user’s PC will not fix it.
  • Do not change these fields for genuine minors without the right consent. If your organisation does serve under-age users, such as a school, record consent properly instead of clearing the age group.
  • Check how it happened. If several accounts are affected, look at the tool or template that created them so new starters are not caught too.
  • Same error, different app names. AADSTS54000 can name OneDrive SyncEngine, OfficeServicesManager, Microsoft Graph or a business app. The fix is the same.

If your team is losing time to Microsoft 365 sign-in errors, book a free consultation with our team.

Was this article helpful?
Ready to secure and simplify your IT? Talk to a GCIT expert today.