How to Update the EmployeeOrgData Value on Entra ID Users

In this article, I’ll explain how to update the EmployeeOrgData for Entra ID users, which includes the Division and CostCenter properties. These properties are typically synchronized from an on-premises Active Directory environment via Entra Connect, but you can also set them using the PowerShell Graph module. Below, I’ll provide an example of how to do this.

Updating EmployeeOrgData

The PowerShell code below first connects to Graph using the User.ReadWrite scope, which grants permission to modify user records. It then updates a user’s EmployeeOrgData collection, setting the Division and CostCenter properties to the specified values.

Afterward, it retrieves the updated properties of the same user to confirm the changes were successful, before disconnecting the session.

Connect-MgGraph -Scopes "User.ReadWrite.All"

# The Object ID or UserPrincipalName of the user to modify
$UserId = "##############"

# Update the EmployeeOrgData IMicrosoftGraphEmployeeOrgData variable type with example data
Update-MgUser -UserId $UserId -EmployeeOrgData @{
    'Division' = 'Test Division'; 
    'CostCenter' = 'Example';
}

# Retrieve the results
$UserDetails = (Get-MgUser -UserId $UserId -Property EmployeeOrgData).EmployeeOrgData
$UserDetails 

Disconnect-MgGraph

Although this article is correct at the time of writing, things change! Be sure to check the official documentation which covers the employeeOrg – employeeOrgData resource type

4 responses to “How to Update the EmployeeOrgData Value on Entra ID Users”

  1.  Avatar
    Anonymous

    Configure EmployeeHireDate and EmployeeLeaveDateTime in Active Directory to be used with Microsoft Entra ID Governance
    This blog post might come in handy and suit your request to sync EmployeeOrgData with Active Directory. Best regards, Markus

    Like

  2.  Avatar
    Anonymous

    can i set EmployeeOrgDataDivision through EntraIDConnect from on-premises ActiveDirectory?

    Like

    1. Shaun Wilkinson Avatar

      I’d assume you could just map it using the same process

      Like

    2.  Avatar
      Anonymous

      update : can i set EmployeeOrgDataDivision through EntraIDConnect from on-premises ActiveDirectory DIVISON attribute?

      Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Design a site like this with WordPress.com
Get started