Configuring Microsoft Directory Sync
Last updated
Last updated
Go to your Azure portal, search for "App Registration," and then click on "New Registration.”
Register your application and configure it as a single tenant.
Once you register, you will land on a page where you will see the following information:
Before moving forward, we need to complete two steps. The first step is to generate a secret key. Click on "Add a certificate or secret" next to "Client credentials."
You will see the following page. Click on "New client secret."
Set a description for the client secret and choose an expiration period. Once you create it, make sure to copy the value and store it somewhere safe, as you will not be able to copy it again. If you lose it, you will need to generate a new one and reconfigure the AD sync with the Swift UI.
For the second step, go to "API Permissions" from the menu on the left.
Here, we need to add a ReadAll permission as well, so click on "Add a permission.”
Once this side panel opens, click on "Microsoft Graph".
select "Application permissions.”
Search for "Directory" and locate the "Directory.ReadAll" permission. Check that permission, and once done, click on "Add permissions.”
Once that's done, the permission will appear in the list.
Here, we need to Grant admin consent to the Default Directory, so click on that option.
Click on "Yes".
Granted Successfully.
Once that's done, let's head over to our Swift UI and go to Directory Sync. Here, we will integrate Microsoft with Swift by pasting the client ID, tenant ID, and secret key (previously copied).
If configured correctly, clicking on "Test Connection" should display a prompt saying that the connection was successful.
Adding the connection will sync your organization’s users with our application. You can click on the ellipsis icon to view the user list.