Short Version
What is the best way to return the Company
value of a User
in Azure AD B2C
after they sign in?
A) Add Company
as a custom User Attribute
and include it in the Application Claims
of the User Flow
?
or:
B) Somehow grab the existing Company
value from the User Profile
?
If the answer is B
, how can I grab that value, as it doesn't seem to be present in the id_token
or access_token
that is returned after a successful sign in.
Long Version
I was thinking to show the Company
value of a User after they have logged in to a Node app via Azure AD B2C.
Initially, I was going to add Company
as a Custom Attribute
via:
Azure AD B2C
> User Attributes
And then check it as an Application Claim
at:
Azure AD B2C
> User Flows
> B2C_signin_1
> Application Claims
But then I thought, hang on isn't the Company
field already in the user's profile at:
Azure AD B2C
> Users
> [ select user ]
> Profile
And indeed it is:
However, the information in the User Profile
does not seem to be in either the id_token
or access_token
that is returned after a successful login:
Question
What is the best way to return the Company
value of a User
in Azure AD B2C
after they sign in?
A) Add Company
as a custom User Attribute
and include it in the Application Claims
of the User Flow
?
or:
B) Somehow grab the existing Company
value from the User Profile
?
If the answer is B
, how can I grab that value, as it doesn't seem to be present in the id_token
or access_token
that is returned after a successful sign in.