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
- Open the LastPass Admin Dashboard. Select Applications from the left side menu and then select Web App from the submenu.
- Click on + Add SSO App button from the upper right corner.
- A pop-up window will appear. Under the section: Select your app, click on Search… and select Office 365 from the LastPass Catalog.
- On One Click Setup section enter Microsoft Global Admin Email, Password, and Domain. Note: LastPass will not store your credentials.
- Click on One-click setup and Save.
Manually add Office 365
- 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 https://lastpass.com/company/#!/dashboard with your admin username and Master Password.
- Go to .
- If you have not previously added SSO apps, click Add your first SSO app. Otherwise, click Add app in the upper-right navigation.
- 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.
- Click Continue.
- 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)
- Optional: If needed, you can click the Download icon to download and save the LastPass Certificate (TXT) and/or Metadata (XML) files.
- Open a new web browser window or tab to proceed with the next steps.
Part 2 - App Configuration
- Log into Office 365 administration center as an administrator and then click on Admin.
- From the left side menu select Settings > Domans.
- 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.
- 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.
- 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 .onmicrosoft.com as the default domain.
- SSO configuration for Office 365 requires Windows Azure Active Directory Module for Windows PowerShell cmdlets. Download and install cmdlets from the following link: https://technet.microsoft.com/en-us/library/jj151815.aspx
- 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
- To configure Office 365 SSO, customize the PowerShell command template as follows:
- $domain: enter your company domain in the following format: yourworkdomain.com
- $issuer enter your company domain at the end of the URL, in the following format: https://identity.lastpass.com/yourworkdomain.com
- $certificateFile Full path and filename of theh certificate file you've just downloaded
- Please open Powershell as an administrator. $cred=Get-Credential
Result: It will prompt for the administrator's credentials.
- Type your administrator login credentials into the dialog that appears on the screen.
- Copy and paste the second command, to get authenticated on Office 365: Connect-MsolService -Credential $cred
- Copy the block of PowerShell commands starting with $domain and ending with $logoffurl. Paste them into your PowerShell window.
- Then copy and paste the second block to upload the certificate file.
- 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.
- Return to the LastPass Admin Console.
- On the LastPass Admin Console web browser window or tab you left open as the last step in Part 1, locate Set up LastPass.
- 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.
- 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
- 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.
- Optional: To add more custom attributes, click Add SAML attribute, then use the drop-down menu to make your selections.
- During the app setup, you can click Save & assign users to begin selecting users to assign.
- To assign new users, click Assign users, groups & roles in the Users, groups & roles window.
- In the Assign users, groups & roles window select specific Users, Groups or Roles to assign.
- When selected, click Assign.
- Click Save & continue when finished in the Users, groups & roles window.
- Click Finish.
If you have already set up and saved the app, click the app in theApplications 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
|See all licenses||
Get-MsolAccountSkuYou need your AccountSku number to be able to add users.
New-MsolUser -UserPrincipalName -ImmutableId -FirstName -LastName -DisplayName -LicenseAssignment -usageLocationThe 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.
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.