How to Update a Microsoft Graph Custom Attribute for All Users
Question details
The user needs to bulk populate or update a newly created Microsoft Graph profile card property (CustomAttribute1, displayed as Workstation ID) for every user in the directory.

- Product
- Microsoft Graph
- Device & OS
- not provided
- Scenario
- An administrator has created a custom attribute for user profiles and needs a method to apply or update this attribute across all users in the organization.
- Observed behavior
- The custom attribute exists in the system, but the administrator is seeking the correct PowerShell script, API endpoints, or bulk update method to populate it efficiently.
Ensure you have the necessary administrative privileges, such as Global Administrator or Privileged Role Administrator, and that you have consented to the 'User.ReadWrite.All' permission in Microsoft Graph.
Use Microsoft Graph PowerShell and Consult Official Support
Bulk updating custom attributes requires administrative scripting. While PowerShell is the standard tool, consulting the Microsoft Graph Q&A forum is recommended for exact API endpoints and syntax validation.
Updating custom extension attributes (like CustomAttribute1) across an entire directory involves iterating through your user list using the Microsoft Graph API. Because custom attribute schemas can vary depending on how they were provisioned (e.g., on-premises AD sync vs. cloud-only extension properties), the exact command syntax may differ.
For complex bulk updates, Microsoft experts recommend validating your script in the dedicated Microsoft Graph support community to avoid unintended modifications to user profiles.
Create a CSV file containing the User Principal Names (UPNs) of all users and the corresponding 'Workstation ID' values you wish to populate.
Open PowerShell as an administrator and run the command 'Connect-MgGraph -Scopes "User.ReadWrite.All"' to authenticate your administrative session.
Write a PowerShell 'foreach' loop that imports your CSV data and uses the 'Update-MgUser' cmdlet to apply the new attribute value to each user's profile.
Before running the script in a production environment, post your drafted script and schema details to the dedicated Microsoft Graph Q&A forum (https://learn.microsoft.com/en-us/answers/tags/161/ms-graph) for endpoint and permission verification by Microsoft experts.

Manage Your IT Documentation with WPS Office
While Microsoft Graph handles your complex directory management, WPS Office provides a lightweight, free, and highly compatible suite for your everyday administrative tasks. Seamlessly analyze your user CSV exports, draft PowerShell script manuals, and maintain IT documentation without the heavy subscription fees.
- 1. Visit the Official Website: Go to the official WPS Office website to find the latest free version of the software.
- 2. Download the Installer: Click on the 'Free Download' button to download the installer compatible with your Windows, Mac, or Linux operating system.
- 3. Install and Organize: Run the setup file to install WPS Office, then open WPS Spreadsheet to easily manage and edit your user directory CSV files.

Frequently Asked Questions
What API permissions are required to update custom user attributes in Microsoft Graph?
To update user properties, including custom extension attributes, your application or PowerShell session typically requires the 'User.ReadWrite.All' permission, which must be consented to by a tenant administrator.
Can I bulk update Microsoft Graph attributes directly in the Entra ID admin center?
While the Entra ID (formerly Azure AD) admin center allows you to edit basic properties for individual users, bulk updating custom properties like 'CustomAttribute1' usually requires scripting via Microsoft Graph PowerShell or direct Microsoft Graph API calls.
Where can I get help if my Microsoft Graph API call fails?
The best place to troubleshoot API endpoints, syntax errors, and permission issues is the official Microsoft Q&A forum under the 'ms-graph' tag, where Microsoft engineers and community experts provide direct support.




