Microsoft Social Identity Provider
Note
Microsoft as a social identity provider requires access over secure HTTP (HTTPS). This example assumes that you've configured IDM on https://openidm.example.com:8443
. Substitute your URL for openidm.example.com
.
Set Up Microsoft
For Microsoft documentation on how to set up a social identity provider, navigate to the following article: Sign-in Microsoft Account & Azure AD users in a single app . You'll need a Microsoft account.
To set up Microsoft as a social identity provider:
Navigate to the Microsoft app registration portal at https://apps.dev.microsoft.com/ and sign in with your Microsoft account.
Select Add an App and give your app a name.
The portal will assign your app a unique
Application ID
.To find your
Application Secret
, select Generate New Password. That password is your Application Secret.Tip
Save your new password. It is the only time you'll see the
Application Secret
for your new app.Select Add Platform. You'll choose a
Web
platform, enableAllow Implicit Flow
and set up the following value forRedirect URI
:https://openidm.example.com:8443/
If desired, you can also enter the following information:
Logo image
Terms of Service URL
Privacy Statement URL
The OAuth2
credentials for your new Microsoft App include an Application ID
and Application Secret
for your app.
Configure a Microsoft Social Identity Provider
To configure a Microsoft social identity provider, log in to the Admin UI and navigate to Configure > Social ID Providers.
Enable the Microsoft social identity provider.
In the
Microsoft Provider
pop-up that appears, the values forRedirect URI
should match the values that you've entered for Allowed Return URLs in "Set Up Microsoft".Include the values that Microsoft created for
Client ID
andClient Secret
, as described in "Set Up Microsoft".Under regular and
Advanced Options
, include the options shown in the following appendix: "Microsoft Social Identity Provider Configuration Details".
When you enable a Microsoft social identity provider in the Admin UI, IDM generates the identityProvider-microsoft.json
file in your project's conf/
subdirectory.
It includes parts of the file that you may have configured through the Admin UI. While the labels in the UI specify Application ID and Application Secret, you'll see them as clientId
and clientSecret
, respectively, in the configuration file.
"provider" : "microsoft", "authorizationEndpoint" : "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", "tokenEndpoint" : "https://login.microsoftonline.com/common/oauth2/v2.0/token", "userInfoEndpoint" : "https://graph.microsoft.com/v1.0/me" "clientId" : "<someUUID>", "clientSecret" : { "$crypto" : { "type" : "x-simple-encryption", "value" : { "cipher" : "AES/CBC/PKCS5Padding", "stableId" : "openidm-sym-default", "salt" : "<hashValue>", "data" : "<encryptedValue>", "keySize" : 16, "purpose" : "idm.config.encryption", "iv" : "<encryptedValue>", "mac" : "<hashValue>" } } }, "scope" : [ "User.Read" ], ...
You should also see UI settings related to the social identity provider icon (badge) and the sign-in button, described in "Social Identity Provider Button and Badge Properties".
You'll see links related to the authenticationIdKey
, redirectUri
, and configClass
; the location may vary.
The file includes schema
information, which includes properties for each social identity account, as collected by IDM, as well as the order in which it appears in the Admin UI. When you've registered a user with a Microsoft social identity, you can verify this by selecting Manage > Microsoft, and then selecting a user.
Another part of the file includes a propertyMap
, which maps user information entries between the source
(social identity provider) and the target
(IDM).
If you need more information about the properties in this file, refer to the following appendix: "Microsoft Social Identity Provider Configuration Details".
Configure User Registration to Link to Microsoft
Once you've configured the Microsoft social identity provider, you can activate it through User Registration. To do so in the Admin UI, select Configure > User Registration, and activate that feature. Under the Social tab that appears, enable Social Registration. For more information on IDM user self-service features, see "Self-Service End User UI".
When you enable Social Registration, you're allowing users to register on IDM through all active social identity providers.
Microsoft Social Identity Provider Configuration Details
You can set up the Microsoft social identity provider through the Admin UI or in a conf/identityProvider-microsoft.json
file. IDM generates the identityProvider-microsoft.json
file when you configure and enable this social identity provider in the Admin UI. Alternatively, you can create the file manually.
The following table includes the information shown in the Admin UI Microsoft Provider pop-up window, along with associated information in the identityProvider-microsoft.json
file:
Property (UI) | Property (JSON file) | Description |
---|---|---|
Application ID | clientId | The client identifier for your Microsoft App |
Application Secret | clientSecret | Used with the Application ID; shown as application password |
Scope | scope | OAuth 2 scopes; for more information, see Microsoft Graph Permission Scopes. |
Authorization Endpoint | authorizationEndpoint | Typically https://login.microsoftonline.com/common/oauth2/v2.0/authorize |
Token Endpoint | tokenEndpoint | Endpoint that receives a one-time authorization code and returns an access token; typically https://login.microsoftonline.com/common/oauth2/v2.0/token |
User Info Endpoint | userInfoEndpoint | Endpoint that transmits scope-related fields; typically https://graph.microsoft.com/v1.0/me |
Not in the Admin UI | name | Name of the social identity provider |
Not in the Admin UI | type | Authentication module |
Not in the Admin UI | authenticationId | Authentication identifier, as returned from the User Info Endpoint for each social identity provider |
Not in the Admin UI | propertyMap | Mapping between Microsoft and IDM |
For information on social identity provider buttons and badges, see "Social Identity Provider Button and Badge Properties".