Azure AD B2C: Set default value of custom attribute

Viewed 581

Is there a way to set a default value for a custom attribute in Azure AD B2C?

I have an boolean attribute which indicates if a user has signed all agreements. The users will be created by Microsoft Graph API and I want to predifine the value for this attribute, so that I don't have to set it when the user is created.

Thank you in forward!

Best regards Matthias

1 Answers

No. It's not supported by AAD B2C currently.

No matter whether you use Microsoft Graph or User flow / Custom policy, the custom attribute should be set when the the user is created into the AAD, then the default value of custom attribute can be saved.

I don't think this is a difficult job. Just add one more line when creating the user:

{
    "extension_8adbe99219ca4e689a5030b5af068847_YesOrNo": true
}

Besides, from a design perspective, this custom attribute should be updated after the user signs the agreement. It seems that predefining its value at the time of user creation is not necessary.

Related