# Provisioning SCIM groups and users with Microsoft Entra ID

The Multi-Domain Identity Management System (SCIM) establishes standardized communication between Modyo and Microsoft Azure to automatically synchronize user and group data. This allows you to:

  • Create users in Microsoft Azure and automatically provision them in Modyo.
  • Update user data in Microsoft Azure and reflect changes in Modyo.
  • Delete users in Microsoft Azure and deprovision them in Modyo

This integration of groups and users between Modyo and Microsoft Entra ID with the Modyo SCIM API simplifies the management of users in different systems and reduces errors, promoting efficient administration.

Attention

The synchronization is unidirectional, meaning that data changed in Modyo will not affect user data in Azure. In addition, any changes made in Azure can overwrite the changes made in Modyo.

# Step 1 Create your application in Microsoft Entra ID

  1. Access the Microsoft Entra admin center (opens new window)
  2. Browse to Entra ID > Enterprise apps
  3. Select + New application > + Create your own application
  4. Name your application, choose the option Integrate any other application you don't find in the gallery and click Add

# Step 2 Provisioning

  1. Open the application you created in the previous step
  2. In the left panel, select Provisioning
  3. Select + New configuration
  4. In the admin credentials, add the following:
    • Tenant URL: The URL of your SCIM-compatible web server, for example: https://yourdomain.modyo.cloud/api/admin/scim
    • Secret Token: The access token of the account owner or of a Modyo administrative user with the Full admin role, assigned directly or through a group. With any other role, Modyo rejects requests on users with a 401 error. Detailed token information can be found in the Management API (opens new window) section
  5. Click Test Connection to verify the connection
  6. If the connection succeeds, click Create to create the provisioning job
  7. In Overview > Properties, you can enable notification emails and accidental deletions prevention. For more information about these configurations, review the Microsoft Entra ID (opens new window) documentation
  8. In the left panel, select Attribute Mapping, which groups the mappings into two sets: Users and Groups
  9. Select a set to proceed to the attribute assignment step

# Step 3 Assigning attributes

# Groups

  1. In Attribute Mapping, select the Groups set to configure its attributes.
  2. Select the actions of the target object: Create, update, and/or delete. Confirm that the mapping is:
Source Attribute Target Attribute
displayName displayName
objectId externalId
members members
  1. Click Save

# Users

  1. In Attribute Mapping, select the Users set to configure its attributes.
  2. Select only the actions: Create and update. Make sure the mapping is:
Source Attribute Target Attribute
userPrincipalName userName
Switch([IsSoftDeleted],, "False", "True", "True", "False") active
mail emails[type eq "work".value]
givenName name.givenName
surname name.familyName
Join(" ",[givenName],[surname] name.formatted
  1. Click Save
  2. Once this is done, in the Provisioning section, in the configuration options you will now have the option of Scope, select Synchronize all users in the group
  3. Click Save

You can confirm that your mapping configuration is correct by following these steps:

  1. In Azure, go to provisioning
  2. Select On-Demand Provisioning
  3. Confirm that the process is running without showing errors

Tip

For groups, there is no on-demand provisioning, in order to test the group configuration, you must create a user, add it to a group and select begin provisioning.

This task is executed every 40 minutes, so you must wait this time to see the changes reflected in the platform.

Once properly configured, you can add users to Microsoft Entra ID. At the same time, your existing groups will also be provisioned.

Attention

Username and email are required fields to generate users. Without them, user provisioning will fail.

# SCIM server contract

Besides Entra ID, you can connect any SCIM 2.0 client to the Modyo server. The base URL is https://[account_host]/api/admin/scim and calls are authenticated with a token, just like in the rest of the Administration API. The token must belong to the account owner or to a user with the Full admin role, assigned directly or through a group; with any other role, the /Users and /Schemas endpoints, and group DELETE, respond 401. The users this server manages are the Team ones, not the Customers ones.

Resource Methods Description
/Users GET, POST Lists and creates users. The listing supports pagination with startIndex and count, and the userName eq "value" filter; filtering by externalId is not supported. Any other operator, or an attribute other than userName and externalId, responds 400.
/Users/:id GET, PATCH, PUT Gets and updates a user. PATCH accepts operations on userName, name, emails, and active. PUT is an alias of PATCH and expects the same body.
/Groups GET, POST Lists and creates groups.
/Groups/:id GET, PATCH, PUT, DELETE Gets, updates, and deletes a group. PUT is an alias of PATCH and expects the same body.
/Schemas GET Returns the definition of the urn:ietf:params:scim:schemas:core:2.0:User and urn:ietf:params:scim:schemas:core:2.0:Group schemas with all their attributes. Use it if your client discovers the schema before provisioning. Like the rest of the SCIM endpoints, it is listed in the Administration API Swagger portal.

Resource responses and their SCIM errors (400, 404, 409, 422, and 500) use the application/scim+json content type and not the application/json declared by the rest of the Administration API. Make sure your client accepts it. 401 errors, caused by a missing or invalid token or by missing permissions, do not carry a SCIM body.

Attention

User deprovisioning is not done with DELETE. The DELETE /api/admin/scim/Users/:id route exists, but it has no implementation: the request ends in a generic error, with no SCIM response, and the user is not changed. To deprovision, send a PATCH to /Users/:id with the active property set to false. For groups, DELETE is implemented.

# References