Share via

Azure SCIM Patch behavior when using AssertiveAppRoleAssignmentsComplex

Huy Phan 5 Reputation points
2025-04-08T15:05:25.2466667+00:00

I have an Enterprise Application which enable provisioning and I need multiple roles can be configure. I follow this guide https://learn.microsoft.com/en-us/entra/identity/app-provisioning/customize-application-attributes#provisioning-a-role-to-a-scim-app and using AssertiveAppRoleAssignmentsComplex.

My application configure customappsso User Attributes as follow:

  • Name: roles
  • Type: string
  • Multi-value: checked (true)

But currently I have an issue when provision as that when a GET request come and my application already response with

# GET /Users/******@example.onmicrosoft.com
{
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User"
    ],
    "id": "******@example.onmicrosoft.com",
    "userName": "******@.onmicrosoft.com",
    "active": true,
    "roles": [
        {
            "value": "User.Jenkins",
            "displayName": "User.Jenkins"
        }
    ]
}

However, Azure still send a PATCH request

# PATCH when just one app role assigned
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "Add",
            "path": "roles",
            "value": [
                {
                    "value": "{\"id\":\"30c0b75b-45c4-41a5-b8cc-eeed272018fa\",\"value\":\"User.Jenkins\",\"displayName\":\"User.Jenkins\"}"
                }
            ]
        }
    ]
}

# PATCH when two app roles assigned
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "Add",
            "path": "roles",
            "value": [
                {
                    "value": "{\"id\":\"30c0b75b-45c4-41a5-b8cc-eeed272018fa\",\"value\":\"User.Jenkins\",\"displayName\":\"User.Jenkins\"}"
                },
                {
                    "value": "{\"id\":\"f0d3f072-5ecd-4494-ab7d-a4e9699fb063\",\"value\":\"User.JFrog\",\"displayName\":\"User.JFrog\"}"
                }
            ]
        }
    ]
}

Am I return a wrong response structure for GET request?

Best regards, Huy

Microsoft Security | Microsoft Entra | Microsoft Entra ID

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.