Configure Single Sign-On for Office 365

Configure single sign-on (SSO) to let your users authenticate to Office 365 using their Okta credentials.

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 using PowerShell

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:

  • 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

  1. You can use one of the following methods to configure SSO for Office 365:

  2. After you've configured the SSO, you need to Test Single Sign on 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.

  1. In the Admin Console, go to Applications > Applications.

  2. Search for and select your Office 365 integration.
  3. Go to the Sign On tab.
  4. Click Edit in the Settings section.
  5. In Sign on methods, select Secure Web Authentication.
  6. Select the appropriate option for username and password setup. See Secure Web Authentication.
  7. Map username format as explained in Map profile attributes Okta to Office 365.
  8. Click Save.

Configure SSO with WS-Federation

There are two configure settings for SSO with WS-Federation: Automatic and Manual using PowerShell. You can allow Okta to automatically configure WS-Federation or you can manually configure it using the customized PowerShell script that's provided by Okta. Okta recommends configuring WS-Federation automatically because back-end procedures are managed by Okta.

Signing certificates

The Office 365 app integration uses a signing certificate for the WS-Federation sign-on method (whether automatic or manual). When you create an Office 365 app integration, Okta automatically generates an app-level SHA-256 signing certificate, which is valid for 10 years. This certificate is limited in scope to that app instance only, which limits any potential impact if the certificate is compromised. To ensure continued access to Office 365 apps, complete the Rotate an Office 365 signing certificate task before the integration's certificate expires.

Configure SSO using WS-Federation Automatic

When an Office 365 app instance uses WS-Federation in automatic mode, Okta manages back-end federation processes during both the initial configuration and when certificates are rotated.

First-time setup

If you're configuring WS-Federation for the first time, follow these steps to authenticate and select domains.

  1. In the Admin Console, go to Applications > Applications.

  2. Search for and select your Microsoft Office 365 app integration.

  3. Go to the Sign On tab.
  4. Click Edit in the Settings section.
  5. Select WS-Federation.
  6. Set WS-Federation Configuration to Automatic.
  7. Optional. Click View Setup Instructions. The procedure to configure Office 365 WS-Federation opens in a new window.
  8. Optional. Refer to the Prepare your domain for federated authentication section of the procedure to ensure that you have correctly prepared your domains for federation.
  9. Back on the Sign On tab, click Start federation setup. You're redirected to the Microsoft account sign-in page.
    1. Sign in to Microsoft as a global administrator for your Microsoft tenant.
    2. Read and accept the requested permissions.
  10. Click Federate domains.
  11. In the dialog that appears, select the domains that you want to federate from the dropdown list.
  12. Click Save.

Edit an existing configuration

If you've previously configured WS-Federation, follow these steps to make changes.

  1. In the Admin Console, go to Applications > Applications.

  2. Search for and select your Microsoft Office 365 app integration.

  3. Go to the Sign On tab.
  4. Ensure that WS-Federation is selected as the sign-on method, and that WS-Federation Configuration is set to Automatic.
  5. To view federated parent and child domains in read-only mode, click View selected domains.
  6. To add or remove domains, click Manage verified domains.
  7. To re-authenticate with a different Microsoft Office 365 account, click Re-authenticate with Microsoft Account.
  8. Click Save.

Configure SSO with WS-Federation Manual using PowerShell

If you enabled the MS Graph federation feature, the PowerShell commands are different.

  1. In the Admin Console, go to Applications > Applications.
  2. Search for and select the Office 365 app integration.
  3. Go to the Sign On tab.
  4. Click Edit in the Settings section.
  5. Select WS-Federation.
  6. Set WS-Federation Configuration to Manual using PowerShell.
  7. Click Continue with Manual to confirm your selection.
  8. Click View Setup Instructions for the PowerShell command that's customized for your domain.
  9. Copy this command to use in PowerShell.

In PowerShell:

  1. Enter Connect-MgGraph -Scopes Directory.AccessAsUser.All.
  2. Enter your Office 365 Global Administrator username and password.
  3. Enter the copied customized PowerShell command.
  4. Ensure that the federation is successful by entering this command:Get-MgDomainFederationConfiguration -DomainId yourdomain.name

Test SSO configuration

  1. Sign in to Okta as a test user.
  2. Open Office 365 from the End-User Dashboard.
  3. Ensure that the user is successfully logged in to the Office 365 account.

Next step

Provision users to Office 365