SAML Single Sign On Setup Guides for SAML SSO Microsoft AD FS Migration scenarios Current: Migrate LDAP to Azure AD and rename Users using User Sync Migrate LDAP to Azure AD and rename Users using User Sync GoalThis tutorial describes what to do, when LDAP based authentication should be replaced with Azure AD, renaming the usernames as well.Existing users should keep their tickets, pages etc. after migrating to the new IdP.PrerequisitesJira, Confluence, Bitbucket or Bamboo Server/ DatacenterSAML SSO which always comes with User SyncAzure Active DirectoryAzure AD is assumed to be your new IdP, containing all the users and groups which used to exist in LDAP Important: the following will only work, if users in Azure AD have been/ are synchronized from the existing LDAP to Azure using Azure AD Connect High Level Migration SummaryThe migration will be performed in the following order:Install SAML SSO (which always comes with the User Sync app)Register app for User Sync in Azure AD Setup User Sync connector for your Azure AD Let User Sync copy users from LDAP to the new directory Verify the resultsDisable old LDAP directoryChange usernames to Azure AD formatConfigure SAML SSO to use Azure AD as identity providerStep-by-Step Migration GuideInstall SAML SSO In your Atlassian product, open the in-product marketplace as described in the Atlassian documentation. Search for "resolution saml" and click "Install" for SAML Single Sign On (SSO) by resolution Reichert Network Solutions GmbH. After the installation is complete, click on Manage, then choose Configure. Now, you are on the Add-on / app configuration page and the first step of the setup wizard will appear. Register app for User Sync in Azure AD Below is a text based step by step guide for registering an app in Azure AD. This is required to connect User Sync with Azure AD, described in the next chapter. Quickstart guide Go to portal.azure.com, click "Azure Active Directory" in the left panel and then choose "App registrations".Click on "New registration"Enter a "Name" for the app.Set the Redirect URI to "Web" and enter "https://<your-instance>/plugins/servlet/de.resolution.usersync/oauth2/authorize" in the textfield.Click on "Register".On this page you can see the "Application ID" and the "Directory (tenant) ID". You will need both to setup the Azure AD connector in User Sync.Click on "API permissions" in the left panel.Click on "Add a permission" and choose "Microsoft Graph".Click on "Delegated permission". Search for the "User" entry and expand it. Tick "User.Read" and "User.ReadBasic.All".Click on "Add permissions" to finally add the permissions.Click again on "Add a permission", choose "Microsoft Graph" and click on "Application Permissions".Search for the "Directory" entry, expand it and tick "Directory.Read.All".Then, search for "User", expand it and tick "User.Read.All".Click on "Add permissions" to add the permissions.Next, click on "Certificate & secrets".Add a new Client secret by click on "New client secret".Enter a description, and choose "Never" for "Expires". Click on "Add".Copy the secret now ("VALUE"). You are not able to see it again after leaving that page. Please paste it to a text editor for the tutorial.Now it is time to configure UserSync in your Atlassian product. Please keep the Azure website open, because we will need it later on.Now, go back to your Atlassian product, and go to the UserSync Configuration.Click Add Connector and choose Azure Connector.First, paste the client secret (which you copied before) into the Application Secret.Next, go back to the Azure website and click Properties in the app you have created for UserSync. Copy the Application ID and Directory (Tenant) ID and paste them into the UserSync configuration in your Atlassian product.In the UserSync configuration, activate Enable Scheduled Synchronization. You can provide a Cron expression to set a synchronisation interval. Setup User Sync connector for your Azure ADNow that you've got application Id, directory (tenant) Id and the application secret, you can head over to the administration console of Jira or Confluenceand click on User Sync in the the left hand navigation area. This will take you to the User Sync Configuration page.Click on "Add Connector" and choose "Azure Connector".Grab the Application ID, Directory (tenant) ID and the Application Secret from the previous chapter.You can find it again on the overview page of the Azure AD app. If you forgot to copy the application secret, you need to create a new one.Copy and paste Application ID, Directory (tenant) ID and the Application Secret into the the corresponding fields on the Azure AD connector pageand click on Authorize. Once you've successfully granted the permissions needed, the connector can now be further configured.Click on Show Advanced Settings at the bottom of the configuration page which will reveal more configuration settings.Scroll down to the User Sync Settings section and select "Copy theses users" as copy behaviour.Then scroll to the Attribute Mappings section and select onPremisesSamAccountName (onPremisesSamAccountName) as connector attribute value for the Username application attribute value. This ensures that the old LDAP usernames will be preserved, so that users keep their issues, filters, pages etc.Further down on the advanced settings page, you'll find a section called Local Group Management in which you should consider adding the below wildcard expressionfor Keep these Groups: .*So the settings should look like this afterwards:This is the safest way to ensure, that all groups who used to be assigned to the users in the old directory are also available in the new directory.This is only required if you are unsure about all existing groups also being available in Azure with the same name or you can't make the transition that quickly.You can remove that wildcard later and only groups assigned to the users in Azure would be assigned to the user in Jira/ Confluence/ Bitbucket.You could also be more specific about what groups you want/ need to keep, by adding each by name in a single entry. Group memberships can be important for applying restrictions to projects and spaces. Keeping all existing groups for the migration is always the safest option. Before you save your settings, make sure scheduled synchronization is not enabled/ checked!Now it's time to Save you settings to start the initial sync. Continue with the next chapter below.Let User Sync copy users from LDAP to the new directoryClick on the Sync button in the actions column. User Sync will lookup the users from Azure AD in your existing directories, find them in the LDAP user directoryand copy the users to the directory which has been created by the connector.The sync might take some time, depending on the amount of users. During and after that time, you'll see a status window, informing you about the progress:Partial failures don't necessarily mean something is wrong, usually these are Azure AD internal users with missing attributes which couldn't be processed.You can check details by looking at the file provided via Download results or look at the top of the status window:Verify the resultsNow that the sync operation has been completed, you can navigate to the Users management console and you should notice, that your LDAP users are now listed under the Azure directory (or whatever you named your connector):You should still see details like the profile icon picture, login details, group memberships and application access.Disable old LDAP directoryNow that users have been copied, you can disable the LDAP directory (don't delete it yet).From this point on, no user will be able to login anymore and this won't work before you've completed the configuration of the SAML SSO app in the next chapter.Change usernames to Azure AD formatTo be better prepared for configuring SAML SSO in the last step of the tutorial, we need to change the usernames to the Azure AD format.Go back to the User Sync configuration of your Azure connector (click on Edit) and click on Show Advanced Settings againNavigate to the Attribute Mappings section and select userPrincipalName (userPrincipalName)as connector attribute value for the Username application attribute value. Save you settings and initiate another sync again.Once complete, you'll notice that the usernames have been changed to match the Azure AD format:Schedule synchronization with Azure ADYou might want to schedule the synchronization of your Azure directory with User Sync.You'll find the settings for that again under Show Advanced Settings at the very bottom of the page.Enable Scheduled Synchronization needs to be ticked, the default cron expression would then cause a sync every hour.Now it's time to finally configure SAML SSO so that users can Single Sign-on via Azure AD.Please follow the steps in the linked guide in the next chapter.Configure SAML SSO appPlease follow this detailed guide to setup the SAML SSO app with Azure AD.You can skip its Configure Azure AD for User Sync part as you did that already as part of this guide.