In a recent project, I was tasked with enabling the synchronization of Entra ID (formerly Azure AD) security groups and their members into an ITSM CMDB hosted on Jira. The objective was to ensure accurate visibility of group-to-user relationships, leveraging Atlassian’s SCIM 2.0 API capabilities.
While the goal sounds straightforward – syncing groups and users from Entra ID into Jira’s directory – there are several critical nuances in how the Atlassian SCIM API must be used. Below I’ll walk through the key steps, recommended API endpoints, and one crucial parameter you must capture during setup or risk blocking future integrations.
Once SCIM provisioning is enabled for your Atlassian organization, you can interact with the directory using the endpoints provided under the SCIM 2.0 specification. The primary ones used for syncing groups and members are:
GET /scim/directory/{directoryId}/Users
POST /scim/directory/{directoryId}/Users
PATCH /scim/directory/{directoryId}/Users/{userId}
GET /scim/directory/{directoryId}/Groups
POST /scim/directory/{directoryId}/Groups
PATCH /scim/directory/{directoryId}/Groups/{groupId}
These endpoints allow you to provision group structures and memberships from Entra ID into Jira. When syncing to the CMDB module, group membership data can later be mapped to custom objects or referenced directly, depending on the configuration.
When configuring provisioning in Entra ID:
When you create the connection in Entra ID, Atlassian provides you with a Directory base URL (sometimes referred to simply as the SCIM endpoint or tenant URL). This value is shown only once during the initial setup.
You WON’T be able to retrieve it again from the Atlassian UI!
This is not obvious, and is thus often missed.
You must manually store this URL somewhere secure (e.g., a secrets vault, password manager, or configuration management system) at the moment it is provided. If you don’t, you’ll later have no way of programmatically interacting with the SCIM API, since the URL contains the directory ID and it’s required in every call.
It’s typical format is:
https://api.atlassian.com/scim/directory/{directoryId}
Without this, you cannot correctly call:
/Users
/Groups
or any PATCH/POST operations.
A common pattern when importing groups into a Jira-based CMDB is:
GET /Users to see existing accounts or POST /Users to provision new ones if neededPOST /Groups to provision Entra ID groups into the Atlassian directory:{
"displayName": "ExampleGroup",
"members": []
}
PATCH /Groups/{groupId} to attach user references:{
"Operations": [
{
"op": "add",
"path": "members",
"value": [
{
"value": "userId-from-Users-endpoint"
}
]
}
],
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
]
}
If you’re integrating Entra ID groups into a Jira CMDB through SCIM, plan ahead of time to:
/Users and /Groups endpoints for synchronizationThis one precaution will save you from having to tear down and reconfigure the entire Entra ID provisioning setup if you ever need to script or extend the sync later.
For reference you can have a look at the Atlassian official documentation.
Did you find this article interesting? Does it match your skill set? Programming is at the heart of how we develop customized solutions. In fact, we’re currently hiring for roles just like this and others here at Würth Phoenix.