Hi Grace,
To apply above value, you can use with couple of approach for i.e using from Graph Explorer https://developer.microsoft.com/en-us/graph/graph-explorer, from code using MS Graph SDK https://learn.microsoft.com/en-us/graph/sdks/sdks-overview or from Powershell https://learn.microsoft.com/en-us/powershell/microsoftgraph/?view=graph-powershell-1.0.
But in your case, i think you can utilise Graph Explorer. It's a developer tool (with simple UI) that lets you conveniently make Microsoft Graph REST API requests and view corresponding responses. Use Graph Explorer to try APIs in a development tenant to explore capabilities and use it as a prototyping tool to fulfill your scenarios.
Steps:
- Open https://developer.microsoft.com/en-us/graph/graph-explorer from your browser, and then Sign-in using your M365 account
- After signing, get your Id from this endpoint https://graph.microsoft.com/v1.0/me
- Change the http method to "Patch" then put this value in the endpoint https://graph.microsoft.com/v1.0/users/yourId. Put below json data in the request body
{
"onPremisesExtensionAttributes": {
"extensionAttribute1": "manager"
}
}
And then, ensure to grant permission for User.ReadWrite.All from modify permission tab. Your may require your global administrator to approve the consent. Here is the patch screenshot
- Once everything configured, then run query. To verify the changes takes effect, call this endpoint.
68a29129-aea9-4802-a70a-7e256dcd7dde - yourId
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".