Microsoft Entra Configuration Using Built-in Microsoft Provider
Following https://www.keycloak.org/docs/26.5.2/server_admin/index.html#_microsoft
In Microsoft Entra
From https://entra.microsoft.com/ perform the following steps.
- Copy or save the Tenant ID
- Visit “App registrations”
- Click “New registration”
- Set “Name” to
Philanthropy Data Commons - Set “Who can use this application or access this API?” to “Accounts in this
organizational directory only (Default Directory only – Single tenant)” - Click “Register”
- Click “Certificates & secrets”
- Under “Client secrets” click “New client secret”
- Set “Description” to
PDC delegated authentication - Set “Expires” to “730 days (24 months)”
- Click “Add”
- Copy or save the secret Value and Secret ID
- Send Tenant ID, Application (client) ID, and secret Value to the PDC admin
Grant permission to PDC Keycloak to read user data from Microsoft.
- Under “Manage” click “API Permissions”
- Under “Microsoft Graph” to the right of “User.Read” click the ellipsis “…”
- Under “Configured Permissions” click “Add a permission”
- Click “Microsoft Graph”
- Click “Delegated permissions”
- Check “email”, “openid”, and “profile”
- Click “Add permissions”
- Click “Grant admin consent for Default Directory”
Restrict PDC access to specific users (or groups)
Following https://learn.microsoft.com/en-us/entra/identity-platform/howto-restrict-your-app-to-a-set-of-users
- Click “Enterprise Apps” in the leftmost menu
- Click “Philanthropy Data Commons” (this context differs from the above)
- Under “Manage” click “Properties”
- Set “Assignment required?” to “Yes”
- Click “Save” (above the properties)
- Under “Manage” click “Users and groups”
- Click “Add user/group”
- Under “Users” click “None Selected”
- Check the users that should have access to PDC
- Click “Select”
- Click “Assign”
If your subscription permits, you may instead (of steps 8-9) create a PDC group,
assign users to that group, and then assign the group to the App.
In Keycloak
- Visit the Keycloak admin console
- In the PDC realm, visit “Identity providers”
- Click “Add provider”
- Under “Social”, click “Microsoft”
- Set “Alias” to include the short name of the organization and
client, for
examplemyfoundation-microsoft-entra-client - Set the display name to include the full name of the organization, for
exampleMy Foundation Microsoft Entra Client - Set the “Client ID” to the value provided by the Entra admin (a UUID)
- Set the “Client Secret” to the value provided by the Entra admin
NOTE: The Secret is not a GUID but instead is a ‘passphrase’ value - Set “Prompt” to
login - Set Tenant ID to the value provided by the Entra admin (a UUID)
- Click “Add”
Under the newly created Identity provider,
- Set “Scopes” to
openid profile email - Set “Hide on login page” to “On”
- Set “Show in Account console” to “When linked”
- Set “Sync mode” to “Import”
- Click “Save”
- Copy or save the “Redirect URI” value
- Send the Redirect URI to the Entra admin
Link the Organization to the newly created Identity provider:
- Visit “Organizations”
- Open the organization
- Click the “Identity Providers” tab
- Click “Link identity provider”
- Select the IdP (created above) from the “Identity provider” dropdown menu
- Select the organization’s domain name from the “Domain” dropdown menu
- Keep “Hide on login page” set to
On - Set “Redirect when email domain matches” to
On - Click “Save”.
Verify the Link to the Organization from the Identity provider:
- Go into the Organization
- Select the “Identity Providers” tab. There should be the entry you just added
- On the right side, click the verticle ellipses and select Edit
- Enable the ‘Redirect when email domain matches’ option
In Microsoft Entra again
- Visit “App registrations”
- Click the “All applications” tab
- Click “Philanthropy Data Commons”
- Under “Redirect URIs” click “Add a Redirect URI”
- Click “Add Redirect URI”
- Click “Web”
- Set “Redirect URI” to the value sent by the PDC admin
- Ensure the “Implicit grant and hybrid flows” items are unchecked
- Click “Configure”
This content was automatically generated from GitHub. Any edits made on WordPress will be lost.