{"id":3509,"date":"2024-12-04T01:16:09","date_gmt":"2024-12-04T07:16:09","guid":{"rendered":"https:\/\/microsoftgeek.com\/?p=3509"},"modified":"2024-12-04T01:19:28","modified_gmt":"2024-12-04T07:19:28","slug":"how-to-update-the-employeeorgdata-value-on-entra-id-users","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=3509","title":{"rendered":"How to Update the EmployeeOrgData Value on Entra ID\u00a0Users"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><a href=\"https:\/\/sysadmin-central.com\/2024\/09\/09\/how-to-update-the-employeeorgdata-value-on-entra-id-users\/\"><img decoding=\"async\" src=\"https:\/\/sysadmin-central.com\/wp-content\/uploads\/2024\/05\/image-1.png?w=1024\" alt=\"How to Update the EmployeeOrgData Value on Entra ID\u00a0Users\"\/><\/a><\/figure>\n\n\n\n<p>In this article, I\u2019ll explain how to update the&nbsp;<strong>EmployeeOrgData<\/strong>&nbsp;for Entra ID users, which includes the&nbsp;<strong>Division<\/strong>&nbsp;and&nbsp;<strong>CostCenter<\/strong>&nbsp;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\u2019ll provide an example of how to do this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Updating EmployeeOrgData<\/h2>\n\n\n\n<p>The PowerShell code below first connects to&nbsp;<strong>Graph<\/strong>&nbsp;using the&nbsp;<strong>User.ReadWrite<\/strong>&nbsp;scope, which grants permission to modify user records. It then updates a user\u2019s&nbsp;<strong>EmployeeOrgData<\/strong>&nbsp;collection, setting the&nbsp;<strong>Division<\/strong>&nbsp;and&nbsp;<strong>CostCenter<\/strong>&nbsp;properties to the specified values.<\/p>\n\n\n\n<p>Afterward, it retrieves the updated properties of the same user to confirm the changes were successful, before disconnecting the session.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code has-primary-color has-text-color has-link-color wp-elements-4cdac6d55360de5209d699288f55ea0f\"><code>Connect-MgGraph -Scopes \"User.ReadWrite.All\"\n \n# The Object ID or UserPrincipalName of the user to modify\n$UserId = \"##############\"\n \n# Update the EmployeeOrgData IMicrosoftGraphEmployeeOrgData variable type with example data\nUpdate-MgUser -UserId $UserId -EmployeeOrgData @{\n    'Division' = 'Test Division'; \n    'CostCenter' = 'Example';\n}\n \n# Retrieve the results\n$UserDetails = (Get-MgUser -UserId $UserId -Property EmployeeOrgData).EmployeeOrgData\n$UserDetails\n \nDisconnect-MgGraph<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In this article, I\u2019ll explain how to update the&nbsp;EmployeeOrgData&nbsp;for Entra ID users, which includes the&nbsp;Division&nbsp;and&nbsp;CostCenter&nbsp;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\u2019ll provide an example of how to do this. Updating EmployeeOrgData The PowerShell code [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,69,35],"tags":[],"class_list":["post-3509","post","type-post","status-publish","format-standard","hentry","category-ad","category-azure","category-cloud-computing"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3509"}],"version-history":[{"count":5,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3509\/revisions"}],"predecessor-version":[{"id":3514,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3509\/revisions\/3514"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}