Can not login to the ADFS – An error occurred. Contact your administrator for more information.

When you try to login via ADFS and you see something similar to:

An error occurred
An error occurred. Contact your administrator for more information.

Error details

  • Activity ID: f5fb3387-8709-4ba0-8688-224688d67811
  • Error time: Wed, 23 Aug 2023 22:08:10 GMT
  • Cookie: enabled
  • User agent string: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

 

If in ADFS logs you see something similar to:

 

Encountered error during federation passive request.

Additional Data

Protocol Name:
wsfed

Relying Party:
urn:federation:MicrosoftOnline

Exception details:
Microsoft.IdentityServer.Web.InvalidScopeException: MSIS7007: The requested relying party trust ‘urn:federation:MicrosoftOnline’ is unspecified or unsupported. If a relying party trust was specified, it is possible that you do not have permission to access the trust relying party. Contact your administrator for details.
at Microsoft.IdentityServer.Web.Protocols.WSFederation.WSFederationSignInContext.Validate()
at Microsoft.IdentityServer.Web.Protocols.WSFederation.WSFederationProtocolHandler.GetRequiredPipelineBehaviors(ProtocolContext pContext)
at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)

 

or during configuring ADFS:

Convert-MsolDomainToFederated –domain domain.eu
Convert-MsolDomainToFederated : The underlying connection was closed: An unexpected error occurred on a send.
At line:1 char:1
+ Convert-MsolDomainToFederated –domain domain.eu
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Convert-MsolDomainToFederated], RemoteException
+ FullyQualifiedErrorId : The underlying connection was closed: An unexpected error occurred on a send.,Microsoft.Online.Identity.Federation.Powershell.ConvertDomainToFederated

 

 

Just execute on your ADFS server:

Update-MSOLFederatedDomain –domain vmplace.eu

before of course:

Connect-MsolService