Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

AADSTS500571: The guest user account is disabled

Technical article
Troubleshooting

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.

A supplier, contractor or partner has been working in your tenant as a guest, and one day they are stopped at sign-in with AADSTS500571. The message says that the guest user account is disabled. The page's cause is the guest's user object in the resource tenant, not the guest's account in their own organisation.

Microsoft's page for this error is short. It gives the cause in one line and a two-row table: if the account is meant to be disabled, do nothing; if it was disabled by mistake, the resource tenant's owners re-enable it, and PowerShell is one way. The checks around that matter most: finding out whether the disabling was deliberate before anyone re-enables an account, and recording the state so the change can be reversed.

Nothing before the Fix section changes anything.

What the error means

The page says that when a guest user tries to sign in to an application that is integrated into Microsoft Entra ID, they receive an "AADSTS500571" error message, "The guest user account is disabled". Its cause, in full: "The guest user object is disabled on the resource tenant."

Three terms matter. The resource tenant is the tenant that holds the application and the guest's user object. The guest is a person who authenticates with an account from another organisation or identity provider. Microsoft's page on the properties of B2B guest users says a user object is created for such a guest in the same directory as your employees, with a UserType of Guest for the common case. Disabled means the user object's account is switched off in that directory, so, on our reading, sign-in is refused whatever the guest's own credentials are.

The page does not say who or what disables a guest, and it does not describe any automatic disabling. That is why the first step in its solution is human: engage the resource tenant owners or sponsor to determine the reason that the guest account is disabled.

Likely causes

Cause What you see How to confirm
The guest account was disabled on purpose AADSTS500571 for that guest; other guests sign in The resource tenant's owners or the guest's sponsor confirm the intent
The guest account was disabled by mistake Same error; a colleague or the guest was working until recently The owners confirm that no decision to remove access was made
A different problem with a similar-looking message The error code differs The sign-in log shows a different code; the page covers only AADSTS500571

The page gives no counts, so the rows are not in order of likelihood. It makes only the first two distinctions, in its own table: "The guest account is supposed to be disabled" and "The guest account isn't supposed to be disabled, or it was disabled by mistake."

Prove the cause before changing anything

All of these read only.

  1. Confirm the error and its code with the guest. The page's message is AADSTS500571 and the text "The guest user account is disabled". A different AADSTS code is a different problem; the page covers only AADSTS500571.

  2. Find the failed sign-in in a sign-in log. Microsoft's sign-in troubleshooting page says to sign in to the Microsoft Entra admin center as at least a Reports Reader, browse to Entra ID, then Monitoring and health, then Sign-in logs, use the filters to search by user name or application, select Failure from the Status menu, and select the failed sign-in. It says to save the Correlation ID, the sign-in error code, the Failure reason, and the Username, User ID and Sign-in identifier. The page for AADSTS500571 does not say which tenant's log holds the entry, so look in the resource tenant first, the tenant that owns the application, and then ask the guest's organisation to look in theirs.

  3. Identify the guest's user object in the resource tenant. The sign-in troubleshooting page lists the User ID among the details to save; on our reading it identifies the guest's object, but the page does not say so, so confirm it against the user object. Write it down. Microsoft's page on the properties of B2B guest users says the user object for a guest has a UserType of Guest.

  4. Read the user object. The page's remedy uses the AzureAD PowerShell module, so a read-only look uses a cmdlet from the same module. The Get-AzureADUser reference shows examples that find a user by -ObjectId or by -Filter. Connect to the resource tenant first. The Connect-AzureAD reference shows a -TenantId parameter:

Connect-AzureAD -TenantId <resource tenant id>
Get-AzureADUser -ObjectId <guest object id>

Read the account-enabled state in the output. The Get-AzureADUser examples do not show the property by name, so check the output you receive against the reference for your module version. Save the output.

  1. Ask the resource tenant's owners or the guest's sponsor why the account is disabled. This is the question the page puts first. A guest who has left a project, or an account closed after a security concern, is a deliberate disable. Re-enabling it would undo a decision.

Example (illustrative): at a Geelong building firm, an external estimator, chris@supplier.example.com.au, signs in on a Monday and is refused with AADSTS500571. The sign-in log in the firm's tenant shows the error code and a User ID. The project manager, who is the guest's sponsor, says the estimator finished work two weeks ago and the account was disabled when the project closed. That is the page's first row: no action, access is expectedly blocked.

Fix

The page's table has two rows. Choose by the answer to the question in step 5.

The guest account is supposed to be disabled

The page says no actions should be performed, because access is expectedly blocked. As general advice, not from the page, tell the guest that access has ended, and tell their sponsor that the guest asked. There is no changing step in this row.

The guest account is not supposed to be disabled, or was disabled by mistake

Risk: The next command turns the guest's account on in your tenant. On our reading, which the page does not state, whatever that guest has been given, such as group memberships, application assignments and access to shared files, becomes usable again as soon as they sign in. If the account was disabled for a reason that nobody told you about, this restores access that someone chose to remove.

The page says the resource tenant owners should re-enable the account, and that one of the options is using PowerShell to set the -AccountEnabled parameter to $true, as described in the Set-AzureADUser cmdlet reference. That reference lists -AccountEnabled as a Boolean parameter that indicates whether the account is enabled, and its syntax takes -ObjectId. It also carries a note that points to a migration guide from Set-AzureADUser to the Microsoft Graph PowerShell, so check which module your administrators use before you run it.

Before you change it, make sure you have the saved output from the proof step, with the account-enabled state as it is now, and the written confirmation from the owners or sponsor that the account should be enabled.

In the PowerShell session connected to the resource tenant, run:

Set-AzureADUser -ObjectId <guest object id> -AccountEnabled $true

To undo it: run the same command with $false. The Set-AzureADUser reference lists the parameter as a Boolean, and that returns the account-enabled state to the one you saved.

Set-AzureADUser -ObjectId <guest object id> -AccountEnabled $false

Only use the undo command if the state you saved was disabled and the owners agree that it should be.

Confirm the fix

  • The guest can sign in to the application without AADSTS500571.
  • The user object read shows the account enabled, and it matches what the owners agreed.
  • A new sign-in log entry for the guest shows a success, and no further failure with the same code.
  • The ticket records who confirmed the decision, when, the state before and after, and the object identifier.

What to watch afterwards

  • A pattern of guests disabled and then needed again. The page says to find the reason the account was disabled, so keep a record of why each guest was disabled and by whom.
  • Different codes for the same guest. If the guest is then stopped by a different AADSTS code, such as one for a policy block, that is a new problem with its own cause.
  • Access that returns along with the account. On our reading, group memberships and application assignments remain on the object while it is disabled, so access returns on re-enable; no Microsoft page we cite says this.
  • The module in use. The Set-AzureADUser reference points to a migration guide to Microsoft Graph PowerShell, so your scripts may need updating.

Risks and limits

These steps have not been run or lab-tested.

The page is dated 2026-01-15 and is brief: it does not say what disables a guest, which role may re-enable one, which tenant's sign-in log shows the failure, or how long a change takes to apply. The AzureAD module cmdlet reference pages show no page date, and the Set-AzureADUser page carries a note pointing to a migration guide. The Get-AzureADUser reference does not show the account-enabled property in its examples, so the read step in the proof section depends on what your own output shows. Microsoft's pages give no counts for how many cases each cause covers.

Sources