Office 365 App Integration

Set up an app integration so that your user can sign into this app using the same credentials that they use for LastPass.

Part 1 - Add the SSO app to LastPass

  1. Open the LastPass Admin Dashboard. Select Applications from the left side menu and then select Web App from the submenu.

    LastPass Web Applications

  2. Click on + Add SSO App button from the upper right corner.
  3. A pop-up window will appear. Under the section: Select your app, click on Search… and select Office 365 from the LastPass Catalog.

    Office 365 App Catalog

  4. On One Click Setup section enter Microsoft Global Admin Email, Password, and Domain.

    Note: LastPass will not store your credentials.

  5. Click on One-click setup and Save.

    Office 365 One click setup

Manually add Office 365

  1. Log in and access the LastPass Password Manager Admin Console by doing either of the following:
    • While logged in to LastPass, click the active LastPass icon in your web browser toolbar, then select Admin Console in the menu.
    • Log in at!/dashboard with your admin username and Master Password.
  2. Go to Applications > SSO apps.
  3. If you have not previously added SSO apps, click Add your first SSO app. Otherwise, click Add app in the upper-right navigation.
  4. In the Search field, under the Select app section, search for your app in the catalog.

    Note: If you cannot find your app click Add an unlisted app.

  5. Click Continue.
  6. Go to this app’s settings to enable single sign-on. Make sure your app recognizes LastPass as the Identity Provider. Some apps allow you to upload settings in an XML file, while others require you to copy and paste the information below.

    Entity ID
    SSO endpoint
    Logout URL
    Default is selected, or select another
    Certificate fingerprint
    Certificate fingerprint (SHA256)

  7. Optional: If needed, you can click the Download icon to download and save the LastPass Certificate (TXT) and/or Metadata (XML) files.
  8. Open a new web browser window or tab to proceed with the next steps.

Part 2 - App Configuration

  1. Log into Office 365 administration center as an administrator and then click on Admin.

  2. From the left side menu select Settings > Domans.

  3. Add a domain that you are going to use for Single Sign-On and go through the steps to confirm that you own the domain.

    Note: DO NOT add any users at this stage.

  4. In the section where you are asked How do you want to use with Office 365?, uncheck the checked boxes next to Exchange Online and Lync Online; unless DNS entries are to be updated.
  5. Make sure that the domain is not the default domain. If it is set as the default domain, please go ahead and change that setting by configuring the as the default domain.
  6. SSO configuration for Office 365 requires Windows Azure Active Directory Module for Windows PowerShell cmdlets. Download and install cmdlets from the following link:
  7. You need to use the PowerShell Command template and the certificate that you downloaded from the LastPass Admin Dashboard.

Part 3 - Finalize the Office 365 SSO App Configuration

  1. To configure Office 365 SSO, customize the PowerShell command template as follows:

    • $domain: enter your company domain in the following format:
    • $issuer enter your company domain at the end of the URL, in the following format:
    • $certificateFile Full path and filename of theh certificate file you've just downloaded

    Configure Office 365 texts

  2. Please open Powershell as an administrator. $cred=Get-Credential

    Result: It will prompt for the administrator's credentials.

  3. Type your administrator login credentials into the dialog that appears on the screen.
  4. Copy and paste the second command, to get authenticated on Office 365: Connect-MsolService -Credential $cred
  5. Copy the block of PowerShell commands starting with $domain and ending with $logoffurl. Paste them into your PowerShell window.

  6. Then copy and paste the second block to upload the certificate file.
  7. Run the following command to enable SSO for your domain: Set-MsolDomainAuthentication -FederationBrandName $domain -DomainName $domain -Authentication federated PreferredAuthenticationProtocol SAMLP -IssuerUri $issuer -Signing Certificate $certificate -PassiveLogOnUri $ssoUrl -ActiveLogOnUri $ecpUrl -LogOffUri $logoffUrl –Verbose

    Result: You have completed the manual SSO setup for Office 365.

  8. Return to the LastPass Admin Console.
  9. On the LastPass Admin Console web browser window or tab you left open as the last step in Part 1, locate Set up LastPass.
  10. LastPass needs to know the app’s URI to the Assertion Consumer Service (ACS) to be able to authenticate users. This is provided by the app.

    The URL to which LastPass sends authentication assertions after authenticating a user. It may also be known as Post-Back URL, Reply URL, Single Sign-On URL, or Service Provider URL.
    Step-up authentication
    Check the checkbox if you want to force users to confirm their identity using the LastPass MFA app upon each login to this app.

  11. Optional: Advanced settings, add any of the following additional customizations:

    Entity ID
    The name of the app how it appears in the Admin Console (and Cloud Apps, if your users have a LastPass password management Vault).
    (also known as the Issuer ID or App ID for your app) – This is the Metadata URL of the Service Provider.
    Learn how to create roles
    Identity Provider
    Relay State
    URL to which the service provider redirects the user after processing the SAML response.
    Choose from Email, Secondary Email, User ID, Groups, Roles, or CustomID. By default, Email is selected. Depends on the configured app, check its support site.
    SAML Signature Method (optional)
    Check the box for using SHA1 and/or SHA256.
    Signing and encryption
    Check the box for using
    • Sign assertion
    • Encrypt assertion
    • Sign request
    • Sign response

  12. Optional: Click Upload partner certificate to upload a Partner Certificate.

    You can define custom attribute statements when creating a new SAML integration, or modifying an existing one. These statements are inserted into the SAML assertions shared with your app.

  13. Optional: To add more custom attributes, click Add SAML attribute, then use the drop-down menu to make your selections.
  14. During the app setup, you can click Save & assign users to begin selecting users to assign.
  15. To assign new users, click Assign users, groups & roles in the Users, groups & roles window.
    1. In the Assign users, groups & roles window select specific Users, Groups or Roles to assign.
    2. When selected, click Assign.
    3. Click Save & continue when finished in the Users, groups & roles window.
  16. Click Finish.

    If you have already set up and saved the app, click the app in the Applications > SSO apps Applications window. In the Configure app window click Save & edit users to Unassign or assign more users, groups and roles.

    Result: Your SSO app is now configured! The LastPass users you assigned to this SSO app can now log in and access the app using their LastPass account.

Troubleshooting for Manual Setup

Error Description
See all licenses


You need your AccountSku number to be able to add users.
Add users

New-MsolUser -UserPrincipalName -ImmutableId -FirstName -LastName -DisplayName -LicenseAssignment -usageLocation

The immutable id is a unique user identifier on Office 365. Make sure Immutable id is reflected in the user's info on LastPass portal, as the user's ID. The user principal name is the IDPEmail. Both these values must match with the Office 365 configuration for single sign-on to be successful.
Delete users

emove-MsolUser -UserPrincipalName <User's email>

The above command moves the user to the Office 365 recycle bin. To create a user with the same name, make sure to remove the user from the recycle bin.
Retrieve a deleted user Get-MsolUser -ReturnDeletedUsers -SearchString <User's email> | select UserPrincipalName, ObjectId
Remove a deleted user from the recycle bin Remove-MsolUser -RemoveFromRecycleBin –ObjectId
Login error Some users might experience the following sign-in issue, due to a known bug on Office 365:

"Sorry, but we're having trouble signing you in. Please try again in a few minutes. If this doesn't work, you might want to contact your admin and report the following error: <error#>."

The solution is simply to restart your browser. Then open a fresh browser tab and try to log in.

Alternatively, LastPass MFA can be used for secure login to Office 365/Azure AD SSO while maintaining Azure AD as the primary Identity Provider. For more info, visit LastPass conditional access setup page.