Converting an Office 365 domain to a federated domain

Complete the following steps:
  1. Launch
    Windows Azure Active Directory Module for Windows PowerShell
    .
  2. Run
    Connect-MsolService
    and provide a set of Office 365 global admin credentials. For example, credentials.
  3. To enable Remote PowerShell, run
    Enable-PSRemoting
    and select the
    [A] Yes To All
    option.
  4. Connect to AD FS service by executing
    Set-MsolADFSContext -Computer <ADFS computer FQDN>
    .
  5. To convert the Office 365 domain to a federated domain, run
    Convert-MsolDomainToFederated - DomainName <Office365_Domain_Name>
    .
  6. After conversion, check to see if the change applied by executing the
    Get-MsolDomain
    cmdlet shows the Office 365 domains.
  7. After the domain is successfully converted, you can see Relying Party Trusts created for Office 365 in the AD FS console.