Authentication fails with the error "The requested federation realm object '< Object ID >' does not exist" for users who are part of domain that is federated with a third party identity provider in either Microsoft Entra ID or Microsoft 365.
This failure happens when the third Party identity provider returns the wrong IssuerURI within the Issuer field in the Security Assertion Markup Language (SAML) response.
Resolution 1
Contact the support team for the third party identity provider and have them correct the IssuerURI, returned as Issuer, in the SAML the response returned to either Microsoft Entra ID or Microsoft 365, through the client.
Resolution 2
Use the command Set-MsolDomainFederationSettings to modify the IssuerURI of the federated domain to match the realm object listed in the error.
-
Connect to Microsoft Entra ID using the MSONLINE module. To check that the module is installed, open PowerShell and execute the
get-module MSONLINE -ListAvailablecommand. -
Follow the steps outlined in Install the Azure AD module to install the module.
-
Run the following commands to verify the preferred authentication protocol of the federated domain.
$federationSettings=Get-MsolDomainFederationSettings -DomainName domain.com $federationSettings.PreferredAuthenticationProtocol -
If the
PreferredAuthenticationProtocolvalue listed in step 3 is shown as WSFED, run the following command to update the IssuerURI.Set-MsolDomainFederationSettings -DomainName domain.com -IssuerUri "value of federated realm object listed in the authentication failure message"The necessary IssuerURI value is listed by Microsoft Entra ID in the authentication failure message.
-
If the
PreferredAuthenticationProtocolvalue listed in step 3 is SAMLP (SAML Protocol), run the following command to update the IssuerURI.Set-MsolDomainFederationSettings -DomainName domain.com -IssuerUri "value of federated realm object listed in the authentication failure message" -PreferredAuthenticationProtocol samlpThe necessary IssuerURI value is listed by Microsoft Entra ID in the authentication failure message.
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
