How to Add Custom Properties to the User Object in Microsoft Entra External ID

Kwame Gyau-Annoaning 20 Reputation points
2024-06-25T12:46:22.22+00:00

I've been attempting to use the New-MgSchemaExtension and New-MgUser cmdlets in Microsoft Graph PowerShell to add custom properties to the User object. My goal is to ensure these custom properties are accessible when creating a new external user and visible when viewing the user's details. However, I haven't had any success so far.

Could anyone provide guidance on how to effectively add custom properties to a user object so that they are included with the user's default properties and can be viewed in the Microsoft Admin Center?

Any assistance on achieving this would be greatly appreciated.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,741 questions
{count} votes

Accepted answer
  1. Navya 6,200 Reputation points Microsoft Vendor
    2024-06-26T10:30:04.1466667+00:00

    Hi @Kwame Gyau-Annoaning

    Thank you for posting this in Microsoft Q&A.

    I understand you want to add Custom Properties to the User Object in Microsoft Entra External ID.

    Could anyone provide guidance on how to effectively add custom properties to a user object so that they are included with the user's default properties and can be viewed in the Microsoft Admin Center?

    The custom attribute is now available in the list of User attributes and for use in your user flows. A custom attribute is only created the first time it's used in any user flow, and not when you add it to the list of User attributes. Custom attributes are not included user's default properties in Microsoft Admin Center. Once you’ve created a new user through a user flow that includes the newly added custom attribute, the object can be queried in Microsoft Graph Explorer

    To define a custom user attribute, you first create the attribute at the tenant level so it can be used in any user flow in the tenant. Then you assign the attribute to your sign-up user flow and configure how you want it to appear on the sign-up page.

    Please follow below steps:

    1.Create custom user attributes: https://video2.skills-academy.com/en-us/entra/external-id/customers/how-to-define-custom-attributes#create-custom-user-attributes

    2.Create a new user flow: https://video2.skills-academy.com/en-us/entra/external-id/customers/how-to-user-flow-sign-up-sign-in-customers

    3.Then include the custom user attribute in a sign-up flow: https://video2.skills-academy.com/en-us/entra/external-id/customers/how-to-define-custom-attributes#include-the-custom-user-attribute-in-a-sign-up-flow

    For your reference: https://video2.skills-academy.com/en-us/entra/external-id/customers/how-to-define-custom-attributes

    Hope this helps. Do let us know if you any further queries.

    Thanks,
    Navya

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful