We must now open PowerShell to convert the domain we previously added to Office 365 to a Federated domain. You’ll want to run Microsoft Online PowerShell as Administrator.
Type $cred=Get-Credential and hit Enter. This cmdlet prompts you for credentials. Type your Office 365 administration account credentials.
Connect-MsolService –Credential $cred
The following command will convert your domain into a federated domain
Convert-MsolDomainToFederated –DomainName demos.local
If successful, you should see the message: Successfully updated ‘demos.local’ domain
If for any reason you need to go back to your previous standard domain, you have to type the following command:
Set-MSOLContextCredential -MSOLAdminCredentials $cred Convert-MsolDomainToStandard –DomainName demos.local –passwordfile password.txt –SkipUserConversion $true
In case you need to update the ADFS connection, you have to type the following command:
Update-MsolFederatedDomain -DomainName demos.local
To configure an administrator user to not to expire the password, type the following command:
Set-MsolUser -UserPrincipalName office365@yourtenantdns.onmicrosoft.com -PasswordNeverExpires $true
After doing that, the next step is to Enable the Directory Synchronization. This will be explained in a future post 🙂