I have domain1 and domain2 added in Azure AD. Trying to federate the 1st domain able to federate while 2nd causing problem, Gives the following problem:
Convert-MsolDomaintoFederated -DomainName <domain2> -SupportMultipleDomain
Convert-MsolDomaintoFederated : Failed to connect to Active Directory Federation Services 2.0 on the local machine. Please try running Set-MsolADFSContext before running this command again. At line:1 char:1 + Convert-MsolDomaintoFederated -DomainName cloud-office.co -SupportMultipleDomain + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Convert-MsolDomainToFederated], FederationException + FullyQualifiedErrorId : InvalidCommandSequenceGeneva,Microsoft.Online.Identity.Federation.Powershell.ConvertDomainToFederated
=============================================================================
Here, we don't have on prim AD and having two domains wants to federate. No ADFS