Configure Single Sign-On for Office 365
You can enable users to sign on to Office 365 using one of the following methods:
- Secure Web Authentication (SWA)
- WS-Federation - automatic
- WS-Federation - manual
SWA is a single sign-on (SSO) method developed by Okta. It stores the end user credentials using strong encryption combined with a customer-specific private key. When the end user clicks the app, Okta securely signs them in using the encrypted credentials. See SWA app integrations.
WS-Federation defines mechanisms to transfer identity information using encrypted SOAP messages. It doesn't require a separate password for Office 365. See WS-Fed app integrations.
Before you begin
- Complete Add Office 365 to Okta.
-
Bring users into Okta: You can import users from a directory such as Active Directory (AD) or an app such as Salesforce. Currently, Okta doesn't support imports that take longer than two hours to complete. Contact Support if you have this type of import. You can also create users directly in Okta. See the following for more information:
- Disable the Microsoft MFA for the Office 365 admin account that you're using for WS-Federation. If the MFA is enabled, it can break provisioning and SSO setups in Okta.
- If you're integrating an Azure Active Directory tenant that has the Web Sign-in option Enabled in the Microsoft Endpoint Manager admin center, ensure that its configuration settings allow your Okta org URL. See the Microsoft documentation for Policy CSP - Authentication.
Start this task
-
You can use one of the following methods to configure SSO for Office 365:
- After you've configured the SSO, you need to Test SSO configuration.
Configure SSO with Secure Web Authentication
You can enable users to sign in to Office 365 using either SWA or WS-Federation. When possible, Okta recommends WS-Federation because it's more secure than SWA.
- Go to .
- In Sign on Methods, select Secure Web Authentication.
- Select the appropriate option for username and password setup. See Secure Web Authentication.
- Map username format as explained in section Test provisioning.
- Click Save.
Configure SSO with WS-Federation
There are two ways of configuring WS-Federation: automatic and manually. You can allow Okta to automatically configure WS-Federation or you can manually configure it using the customized PowerShell script provided by Okta. Okta recommends configuring WS-Federation automatically because back-end procedures are managed by Okta.
Configure SSO with WS-Federation - automatic method
- Go to .
- In Sign on Methods, select .
- Enter your Office 365 Administrator Username and Password.
Your Office 365 administrator username and password for WS-Federation are pre-filled if you provided them while setting up provisioning.
- Click Fetch and Select. This displays a list of all Office 365 domains available for federation.
- Select domains that you want to federate.
- Click Save.
![Info Info](../../../resources/images/assets/icons/notes/alert.png)
Ensure your administrator credentials for the Office 365 aren't in the domain you're federating to avoid being locked out.
Being locked out of the Office 365 domain means that you can't verify your identity in the Microsoft 365 Apps admin center. This is because you need to verify your identity through Okta, where you're recognized as a user, not an admin. Make sure that you're using administrative credentials for an account that belongs to your default Office 365 domain. The default tenant domain is yourtenant.onmicrosoft.com.
Configure SSO using WS-Federation - automatic method (Microsoft Graph)
If you enabled the MS Graph federation feature, your navigation is different.
- Go to .
- In Sign on Methods, select .
- Click Authenticate with Microsoft Office 365. You're redirected to the Microsoft account login page.
- Sign in to Microsoft as a Global Administrator for your Microsoft tenant.
- Read and accept the requested permissions.
- Click Fetch and Select. This displays a list of all Office 365 domains available for federation.
- Select domains that you want to federate.
- Click Save.
![Info Info](../../../resources/images/assets/icons/notes/alert.png)
Ensure your administrator credentials for the Office 365 aren't in the domain you're federating to avoid being locked out.
Being locked out of the Office 365 domain means that you can't verify your identity in the Microsoft 365 Apps admin center. This is because you need to verify your identity through Okta, where you're recognized as a user, not an admin. Make sure that you're using administrative credentials for an account that belongs to your default Office 365 domain. The default tenant domain is yourtenant.onmicrosoft.com.
Configure SSO on with WS-Federation - manual method
- Go to .
- In Sign on Methods, select .
- Click View Setup Instructions for the PowerShell command customized for your domain.
- Copy this command for use in PowerShell.
In PowerShell:
- Enter Connect-MsolService.
- Enter your Office 365 Global Administrator username and password.
- Enter the copied customized PowerShell command.
- Ensure that the federation is successful by entering this command: Get-MsolDomainFederationSettings -DomainName yourdomain.name
Configure SSO with WS-Federation - manual method (Microsoft Graph)
If you enabled the MS Graph federation feature, the PowerShell commands are different.
- Go to .
- In Sign on Methods, select .
- Click View Setup Instructions for the PowerShell command customized for your domain.
- Copy this command for use in PowerShell.
In PowerShell:
- Enter Connect-MgGraph -Scopes Directory.AccessAsUser.All.
- Enter your Office 365 Global Administrator username and password.
- Enter the copied customized PowerShell command.
- Ensure that the federation is successful by entering this command: Get-MgDomainFederationConfiguration -DomainId yourdomain.name
Test SSO configuration
- Sign in to Okta as a test user.
- Open Office 365 from the End-User Dashboard.
- Ensure that the user is successfully logged in to the Office 365 account.