SSO Office 365 federation error


I’m trying to integrate Duo Gateway with SSO for out existing O365. We’ve been using azure directory sync for the local domain to O365. I’ve installed the Duo Gateway but when running the powershell command to federate the O365 domain I receive the following:

Set-MsolDomainAuthentication : You cannot remove this domain as the default domain without replacing it with another
default domain. Use the the Set-MsolDomain cmdlet to set another domain as the default domain before you delete this
At line:1 char:1

  • Set-MsolDomainAuthentication –DomainName $dom -Authentication Federat …
  •   + CategoryInfo          : OperationStopped: (:) [Set-MsolDomainAuthentication], MicrosoftOnlineException
      + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.DefaultDomainUnsetException,Microsoft.Online.

There is only one domain in O365 besides, and this domain is set as default.


Hi gcrews,

You cannot federate a domain that is currently set as the default domain. If you set the spare domain as the default and then federate then run this again it should federate correctly.

Kind Regards,