SCIM Custom Claims

Juan 66 Reputation points
2022-04-28T19:13:32.257+00:00

The company I work for has a Web App that is published in the Azure AD Gallery, now we want to add SCIM provisioning to it.

The problem I'm trying to solve is that in some scenarios a company may need access to two different instances of our Web App, using the same user.

So in order to distinguish what instance they are provisioning to, I would need to receive a value that tells me the instance.

The idea I'm currently exploring is to register two apps inside the same tenant,

197457-image.png

and retrieve some unique value depending on which App is sending the provisioning requests. If I was able to receive the Object Id or the Application Id that would be perfect but right now I only get the Tenant Id, which is the same for both apps.

I followed the accepted answer from here https://learn.microsoft.com/en-us/answers/questions/135345/azure-ad-custom-claims-in-access-tokens.html to try to add some specific claim but I always get the same original claims.

Should this plan of registering two apps and sending different claims ids work? I'm not sure if I'm doing something wrong or if there is some other easier way to accomplish my goal. Much appreciated any help.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,587 questions
0 comments No comments
{count} votes

Accepted answer
  1. Danny Zollner 9,526 Reputation points Microsoft Employee
    2022-04-29T17:42:06.24+00:00

    Claims are a concept in tokens used in auth flows - SAML, OIDC, etc - not in SCIM, which is a standard for provisioning rather than authentication or authorization.

    Our service only allows you to map a flow for attribute values from the source Azure AD object itself - such as a user or group - and not about other objects in the directory, such as the directory itself (i.e.: a directory ID, or the application ID/service principal ID of the application being used for provisioning). The inclusion of the Azure AD tenant ID in a header of the request is not required by the SCIM standard and I believe is not documented either - meaning it could be subject to change in the future, and should not have production dependencies built on it.

    In order to distinguish what instance of the app is being provisioned to, you should build your web app to allow this to be determined either by a value in the SCIM URL (i.e.: https://example.xyz/UniqueValue/scim/v2/) or a value in the bearer token generated by your web app for usage by the SCIM provisioning config in Azure AD.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful