How to create an association between user and application when the user account is created?

Sam Wheat 361 Reputation points
2020-07-08T20:43:57.073+00:00

I have several websites that are registered as applications in my B2C tenant.

When a user creates a new account and logs into one of my websites I want an association to be made between that users account and the application (site) they logged into. User accounts are created for my sites when the user logs in using OIDC.

See also this document. In my tenant the "Add assignment" option does not exist. Also, I want this assignment to be created at the time the user account is created.

How do I do this?

Note that I am not asking how to contact a SCIM endpoint. I use Azure for user and group management.

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

3 answers

Sort by: Most helpful
  1. 2020-07-09T00:38:06.793+00:00

    You will find the option here:

    11661-captura.png

    About creating the assigment you can use Custom Policies to add a REST Technical Profile that calls a custom API you develop that will do so using MS Graph and/or one its SDKs. All this during a Signup user journey (aka Relying Party).

    0 comments No comments

  2. Sam Wheat 361 Reputation points
    2020-07-09T04:26:46.11+00:00

    Thank you for your answer.

    My application is not an Enterprise Application. I do not completely understand how to make my app an Enterprise app. I researched this and found several articles that explain the difference between an App Registration and an Enterprise App however I do not see any article that shows how to actually change my App from an App Registration to an Enterprise App. Note I have to allow users from any domain to create logins to my App using authentication possibly from another domain such as Google or Facebook.


  3. AmanpreetSingh-MSFT 56,301 Reputation points
    2020-07-13T10:47:51.84+00:00

    @SamWheat-7447 You can't change App Registration to Enterprise application. You need to create a new Non-Gallery application under Enterprise applications for this purpose. This will create a corresponding application under App Registration as well. Once the new application is created, you need to update your application code to use the App ID of the new application.

    You can also use below Graph Calls to get AppTemplateID of the Gallery Applications and bootstrap a new Non-Galery application by using AppTemplateID of any gallery app that you want to use as a template.

    1. GET https://graph.microsoft.com/beta/applicationTemplates
    2. POST https://graph.microsoft.com/beta/applicationTemplates/8b1025e4-1dd2-430b-a150-2ef79cd700f5/instantiate {
      "displayName": "MyApp4Test"
      }

    Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.

    0 comments No comments