Memority's REST connector can provision Microsoft Entra ID (Microsoft 365) user accounts and their licenses with the Microsoft Graph API. Some prerequisites must be met before the application can be provisioned.
This page explains how provisioning works in Memority and the prerequisites required to provision Entra ID.
Generic REST connector prerequisites are explained on the REST provisioning page.
Definitions
What is provisioning?
See the definition of provisioning on the REST provisioning page.
What Entra ID objects can be managed?
The plugin manages user accounts and their licenses. Groups and admin roles are not configured by the plugin.
Can we manage licenses?
Yes. Licenses are exposed in Memority as Application Dimensions and selected when assigning the role. The connector then assigns the matching licenses to the Entra ID user.
Memority REST connector
The plugin uses the Memority REST connector. Like all other Memority connectors, it computes the delta between Memority data and target data at each event on the Memority object, to decide the action to perform:
-
Create a new user
-
Link an existing user
-
Update an existing user
-
Delete an existing user
To perform these actions, the connector relies on five operations: SEARCH, GET, CREATE, PATCH and DELETE.
-
If an Entra ID user is already linked to the Memority identity, the connector uses GET to check whether there is a delta.
-
If the identity is not linked, the connector uses SEARCH to find a user with the same mail. The search also looks in the soft-deleted users.
-
After CREATE, PATCH or DELETE, a GET checks that the provisioning succeeded.
-
When the role is removed or the identity is deleted, the connector removes the licenses, then deletes the user. Entra ID then hard-deletes the user according to the retention of the Microsoft tenant.
EntraID authentication prerequisites
The connector calls the Microsoft Graph API with the OAuth2 client credentials flow. It needs an app registration in the Microsoft Entra admin center, with a client secret and Microsoft Graph permissions of type Application. The administrator must give the admin consent to these permissions.
|
ID |
Prerequisites |
|---|---|
|
AUTH1 |
An app registration must exist in the Microsoft Entra tenant. |
|
AUTH2 |
A client secret must be created for the app registration, and its value must be kept. |
|
AUTH3 |
The app registration must have the Microsoft Graph application permissions that the connector needs (read and write of users, license assignment, read of deleted items), with admin consent. |
|
AUTH4 |
The tenant must reach |
Creating the app registration
Follow this procedure in the Microsoft Entra admin center, with an account that can register applications and give admin consent. Do it once for each Microsoft tenant (preprod and prod).
-
Open the Microsoft Entra admin center: https://entra.microsoft.com.
-
Go to Identity, then Applications, then App registrations. Click New registration.
-
Set a name, for example
Memority provisioning. Select Accounts in this organizational directory only. Leave the redirect URI empty. Click Register. -
On the Overview page, copy the Application (client) ID and the Directory (tenant) ID. The tenant ID is part of the access token URL.
-
Open API permissions. Click Add a permission, then Microsoft Graph, then Application permissions.
-
Add the permissions that the connector needs (prerequisite AUTH3). Click Add permissions.
-
Click Grant admin consent for the tenant, and confirm. Check that the status of each permission is Granted.
-
Open Certificates & secrets. In the Client secrets tab, click New client secret.
-
Set a description and an expiry date. Click Add.
-
Copy the Value of the secret at once. Microsoft shows it only one time. Store it in a safe place.
Build the access token URL for each environment:
https://login.microsoftonline.com/<directory (tenant) ID>/oauth2/v2.0/token
The client secret expires at the date that you set. Create a new secret and update the credential in Memority before this date.
EntraID Provisioning plugin
Memority provides a plugin in the MIT Plugin Store that installs and configures the EntraID Provisioning connector. The plugin generates all the configuration files and data that your tenant needs.
Prerequisites
In addition to the common plugin prerequisites, this plugin requires:
|
Prerequisite |
Description |
|
|---|---|---|
|
1 |
Tenant initialized with presets 3.3.0 or later, or Application Dimensions Manager plugin installed |
License management relies on Application Dimensions. Your tenant must have been initialized with presets 3.3.0 or later, or the Application Dimensions Manager plugin must have been installed on your project. |
|
2 |
Microsoft Entra configured |
The app registration must be configured as explained above (prerequisites AUTH1 to AUTH4). |
Scope and limitations
The plugin covers the user account lifecycle and the license assignment. Groups and admin roles are out of scope.
Be aware of the deprovisioning behavior: both the loss of the role and the deletion of the Memority identity delete the Entra ID user. Entra ID keeps the user as soft-deleted for the retention period of the Microsoft tenant.
The plugin sets the usage location of new users to FR. Change it in the generated REST connector definition if your users are in another country.
Installation
The plugin is installed with the standard procedure described on the Memority Plugins page. This section only gives the information that is specific to the EntraID Provisioning plugin.
Installation mode: single installation. The plugin can be installed only once per project.
Plugin form parameters
The plugin form asks for two values. Both fields are mandatory and have no default value.
|
Parameter |
Description |
Example |
|
|---|---|---|---|
|
1 |
Access Token URL - Preprod |
Authentication endpoint used by Memority to get a token before the preprod API calls |
|
|
2 |
Access Token URL - Prod |
Same endpoint for the prod Microsoft tenant |
|
Application credential
The credential is not requested by the form. Set it manually in the Memority administrator portal, for both preprod and prod. Go to System → Settings → Synchronization Service and create a setting of type CREDENTIAL named sync.connectors.prov-entraID.secret. Set the principal to the application (client) ID and the secret to the client secret value.
Data import order
Always import the data in the following order:
-
The application resource of the target environment (
resources_pprod_ProvisioningEntraID.jsonorresources_prod_ProvisioningEntraID.json) -
The licenses (
resources_entraIDLicences.json) -
The role (
roles_ProvisioningEntraID.json)
Once these steps are done, test provisioning end to end with a non-production identity before you open the configuration to real populations.
What does it do ?
The plugin provisions the following attributes:
|
Memority attribute |
Entra ID attribute |
|---|---|
|
enabled |
accountEnabled |
|
commonName |
displayName |
|
firstName |
givenName |
|
lastName |
surname |
|
|
|
|
|
userPrincipalName |
|
email (the part before the @) |
mailNickname |
|
id |
onPremisesImmutableId |
|
Right dimension |
skuId (licenses) |
The plugin manages licenses. A user can have zero, one or many licenses. When the role is removed, the licenses are removed before the user is deleted. By default, the plugin offers Office 365 E3 and Office 365 E5. To offer other licenses, add one resource per license in resources_entraIDLicences.json before the import. The technical ID of the resource is the skuId. The skuId values are in the Microsoft license reference.
At account creation, the connector generates a random initial password, because Microsoft Graph requires one. Memority does not store this password and does not send it to the user. This is an integration choice: adapt it to the needs of the client (for example, a password sent to the user, or authentication through federation only). The password is set in the CREATE script of prov-entraID-rest-definition.xml.
Technical details
Generated files
All generated files are under a Plugins/ProvisioningEntraID folder. Each generated XML file has a description with the plugin name, the plugin version and the generation date.
|
File |
Location |
Description |
|
|---|---|---|---|
|
1 |
prov-entraID-rest-definition.xml |
im/sync/src/main/resources/RestConnectorDefinition/Plugins/ProvisioningEntraID |
REST connector definition: OAuth2 client credentials and the scripts of the operations. TLS validation is active. |
|
2 |
prov-entraID-rest-connector.xml |
im/sync/src/main/resources/ConnectorDefinition/Plugins/ProvisioningEntraID |
Connector linked to the definition. Limit of 750 requests per minute. |
|
3 |
prov-entraID-rest-application.xml |
im/sync/src/main/resources/Application/Plugins/ProvisioningEntraID |
Attribute mapping from Memority to Entra ID. Lookup on the mail. |
|
4 |
prov-entraID-rest-applicationProfile.xml |
im/sync/src/main/resources/ApplicationProfile/Plugins/ProvisioningEntraID |
Enabled profile for the identities that hold the right |
|
5 |
sync.connectors.prov-entraID.accessTokenUrl.xml |
im/sync/src/main/resources/Setting/EntraID/Plugins/ProvisioningEntraID |
Setting with the access token URL, valued per environment. |
|
6 |
sync.connectors.prov-entraID.defaultUrlPrefix.xml |
same |
Setting with the Microsoft Graph URL ( |
|
7 |
sync.connectors.prov-entraID.scope.xml |
same |
Setting with the scope ( |
|
8 |
_sync.connectors.prov-entraID.secret.xml |
same |
Reminder that the credential must be set in the administrator portal. Placeholder values only. Not deployed. |
|
9 |
accountDiscovery-entraID-TaskDefinition.xml |
im/sync/src/main/resources/AccountDiscoveryTaskDefinition/Plugins/ProvisioningEntraID |
Account discovery task: lists the enabled Entra ID users and reports orphaned, synced and out-of-sync accounts. Manual schedule by default. |
|
10 |
resources_pprod_ProvisioningEntraID.json |
im/idm/src/main/data/Plugins/ProvisioningEntraID |
Application resource APP_CCC00001 named EntraID, for pprod. |
|
11 |
resources_prod_ProvisioningEntraID.json |
same |
Same resource, for prod. |
|
12 |
resources_entraIDLicences.json |
same |
License resources: Office 365 E5 and Office 365 E3. |
|
13 |
roles_ProvisioningEntraID.json |
same |
Applicative role CC0001, EntraID, with the access, provisioning and license rights. Requestable by adm.administrator-features, assignable to the myAdministrator and mySupport identity types, single assignment, no self-service. |
|
14 |
app.prov.APP_CCC00001.xml |
im/idm/src/main/resources/Right/Application/Plugins/ProvisioningEntraID |
Provisioning right. |
|
15 |
app.access.APP_CCC00001.xml |
same |
Access right. |
|
16 |
app.licenses.APP_CCC00001.xml |
same |
License right with the |
The role is assignable only to the myAdministrator and mySupport identity types. To assign it to other identity types, for example employees, add them to the role.
For the files that MIT writes in .idea/memority, see the Memority Plugins page.
Updated files
The plugin also updates five existing files of the tenant configuration.
|
File |
Location |
Change |
|
|---|---|---|---|
|
1 |
_citadel-i18n_export.xml |
shared/i18n/src/main/resources/ |
Adds three i18n keys, in French and English: the application name, the license dimension name and the provisioning application label. |
|
2 |
whitelisting.xml |
shared/tcf/src/main/resources/WhiteListing/ |
Allows |
|
3 |
report-prov-applications.xml |
im/idm/src/main/resources/ReferenceTable/ |
Adds the row prov-entraID-rest-application to the provisioning applications reporting table. |
|
4 |
vars_preprod.properties |
im/sync/ |
Appends the three preprod settings: URL prefix, access token URL and scope. |
|
5 |
vars_prod.properties |
im/sync/ |
Appends the same three keys with the prod values. |
Troubleshooting
For issues with the Plugin Store itself, see the troubleshooting section of the Memority Plugins page.
The installation of the plugin fails
-
Cause: The installation stopped before the end. Some files can already be generated or updated. The plugin never overwrites an existing file, so the next installation also fails.
-
Fix: Clean the project completely: delete all the generated files and revert the changes in the updated files (see Technical details). Then install the plugin again.
The provisioning fails with an authentication error
-
Cause: The access token URL, the credential or the client secret is not correct.
-
Fix: Check that the access token URL contains the right Microsoft tenant ID. Check that the credential
sync.connectors.prov-entraID.secretis set for the environment, with the client ID as principal. Check that the client secret has not expired.
A Graph call returns an error 403
-
Cause: The application does not have the necessary permissions.
-
Fix: Check that the application permissions are added and that the admin consent is granted (prerequisite AUTH3).
The user is created without license
-
Cause: No license of this type is available. The log shows that no license is available.
-
Fix: Check that the Microsoft tenant has free licenses of this type, and that the
skuIdis correct.
A user restored from the soft-deleted users has no license
-
Cause: Microsoft does not restore the licenses of a soft-deleted user.
-
Fix: Synchronize the user again.
The license dimension does not show on the role
-
Cause: No license resource of APP_CCC00001 is imported and enabled.
-
Fix: Import and enable at least one license resource of APP_CCC00001.
The account shows as missing just after the role assignment
-
Cause: The account status is not refreshed yet.
-
Fix: Refresh. The account appears as synced.
An existing Entra ID account is not linked and a duplicate is created
-
Cause: The connector correlates on the mail, and the userPrincipalName of the existing account does not equal the Memority mail.
-
Fix: Check that the userPrincipalName of the existing account equals the Memority mail. Run the account discovery before the first provisioning run.
Microsoft returns the error 429
-
Cause: Too many requests are sent to Microsoft Graph.
-
Fix: The connector waits one minute and retries. Lower the load if the error stays.