Others

How to Update a Microsoft Graph Custom Attribute for All Users

Phi Hung VoPhi Hung Vo Oct 10, 2026 869 views

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.

How to Update a Microsoft Graph Custom Attribute for All Users
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.
Before you start

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.

Solution 1Recommended

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.

1
Prepare your update data

Create a CSV file containing the User Principal Names (UPNs) of all users and the corresponding 'Workstation ID' values you wish to populate.

2
Connect to Microsoft Graph PowerShell

Open PowerShell as an administrator and run the command 'Connect-MgGraph -Scopes "User.ReadWrite.All"' to authenticate your administrative session.

3
Draft the bulk update loop

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.

4
Request expert validation

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.

Use Microsoft Graph PowerShell and Consult Official Support
Always Test First: Test your API calls or PowerShell scripts on a small subset of test users before executing a bulk update against your entire Azure AD / Entra ID directory.
Free Microsoft Office alternative

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. 1. Visit the Official Website: Go to the official WPS Office website to find the latest free version of the software.
  2. 2. Download the Installer: Click on the 'Free Download' button to download the installer compatible with your Windows, Mac, or Linux operating system.
  3. 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.
Fully compatible with Microsoft Excel formats (.xlsx, .csv) for managing your bulk user update lists.Lightweight installation that uses minimal system resources while offering powerful features.Familiar, intuitive user interface that requires zero learning curve for IT professionals.Free alternative for viewing and editing Microsoft Word, Excel, and PowerPoint files.
microsoft office alternative - wps office

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.