Prerequisites
- Azure Subscription: You need an Azure account. You can sign up for a free account if you don’t have one.
- Microsoft Graph Explorer: Access Microsoft Graph Explorer.
Step 1. Create an App Registration
To use Microsoft Graph, you must register an application in Azure AD.
- Navigate to Azure Portal: Go to the Azure portal.
- Select Azure Active Directory: In the left-hand menu, click on "Azure Active Directory."
- Register a New Application
- Click on "App registrations."
- Click on "+ New registration."
- Enter a name for your application (e.g., "CustomAttributesApp").
- Select the supported account types (e.g., "Accounts in this organizational directory only").
- Click "Register."
- Copy Application (Client) ID: After registration, note the Application (client) ID from the application overview page. You'll need this ID later.
Step 2. Create a Custom Extension Attribute
Now that we have an app registration let's create a custom extension attribute.
- Open Graph Explorer: Access Graph Explorer.
- Authenticate: Click on "Sign in to Graph Explorer" to authenticate with your Azure account.
- GET Request for Application
- Set the request method to GET.
- Enter the following resource URI, replacing {App registration Object ID} with your Application ID:
- Code: Get https://graph.microsoft.com/v1.0/applications/{App registration Object ID}
- Click "Run Query."
- Create Extension Attribute
- Change the method to POST and enter the following resource URI
- Code: POST https://graph.microsoft.com/v1.0/applications/{App registration Object ID}/extensionProperties
- Add the request body to create a custom attribute (e.g., "Birthday")
{ "name": "Birthday", "dataType": "string", "targetObjects": [ "User", "Group" ] } - Click "Run Query."
- Note the Extension Attribute Name: The response will include the full attribute name in the format.
For example - Code: extension_cde0e9a5d3f44a81b81097334dbb9f66_Birthday

Join the conversation! Your thoughts help the community grow.