How to Populate Extension Attributes for Cloud-Only Accounts in Entra ID
Question details
The user needs to add or manage directory extension attributes specifically for cloud-only accounts within Microsoft Entra ID.

- Product
- Microsoft Entra ID, Microsoft Graph
- Device & OS
- not provided
- Scenario
- Administering directory extension properties for cloud-native accounts when Azure AD Connect is primarily handling and synchronizing on-premises objects.
- Observed behavior
- A programmatic or administrative method is required to directly append extension attributes to cloud-only users without relying on the on-premises synchronization cycle.
Ensure you have the appropriate administrative rights in Microsoft Entra ID and verify that your application has been granted the necessary Microsoft Graph API permissions, such as User.ReadWrite.All.
Use Microsoft Graph API to Manage Extension Attributes
Since Azure AD Connect is designed for synchronizing on-premises objects, using Microsoft Graph is the official and recommended method to update directory extensions for cloud-only accounts.
Microsoft Graph provides a unified programmability model allowing administrators to access and modify Microsoft 365 and Microsoft Entra ID data. By utilizing the Graph API, you can directly patch user objects with the necessary extension attributes, effectively bypassing the need for an on-premises synchronization infrastructure for your cloud-native accounts.
Log in to the Microsoft Entra admin center, navigate to 'App registrations', and create a new application to interact with the Microsoft Graph API.
Assign the 'Directory.ReadWrite.All' or 'User.ReadWrite.All' Microsoft Graph API permissions to your registered application and ensure you grant admin consent.
Query your application via Microsoft Graph to find the exact formatted name of the extension attribute. It is usually formatted as extension_{appId}_{attributeName} without hyphens in the App ID.
Send a PATCH request to the Microsoft Graph API endpoint (https://graph.microsoft.com/v1.0/users/{user-id}) and include the extension attribute name and its new value within the JSON request body.

Boost Your Productivity with WPS Office
While resolving Microsoft Entra ID configurations requires advanced administrative tools like Microsoft Graph, managing your IT documentation, reports, and spreadsheets shouldn't require an expensive Office subscription. WPS Office provides a fully featured, lightweight suite that handles all your administrative documents with ease.

Frequently Asked Questions
Can I use Azure AD Connect to populate attributes for cloud-only accounts?
No, Azure AD Connect is specifically designed to synchronize directory objects and their attributes from your on-premises Active Directory to Microsoft Entra ID. Cloud-only accounts must be managed natively in the cloud using tools like Microsoft Graph or PowerShell.
How do I format the extension attribute name correctly in Microsoft Graph?
In Microsoft Graph, directory extension attributes are typically prefixed with the word 'extension_', followed by the application ID (with all hyphens removed), and ending with the custom name of the attribute. For example: extension_8928374239..._customAttribute.
Is it possible to update these cloud extension attributes using PowerShell instead of raw API calls?
Yes, you can use the Microsoft Graph PowerShell SDK. Specifically, the 'Update-MgUser' cmdlet allows you to pass a dictionary object or a hashtable containing the specific extension attribute names and values to update your cloud-only accounts effortlessly.




