Trying to update a device displayName property using the graph api. Using this documentation (https://docs.microsoft.com/en-us/graph/api/device-update?view=graph-rest-beta&tabs=http). Request details:
PATCH https://graph.microsoft.com/v1.0/devices/{AAD Object ID here}
JSON payload:
{
"displayName": "My-Test-iPad"
}
I've tried this using both v1.0 and beta versions of the API. Both are returning 403 (forbidden). My account is an Intune Admin, and all of my other API calls are working perfectly, including other AAD operations such as group membership adds/removes.
Also, using Set-AzureADDevice Cmdlet from the AzureAD PowerShell module works fine to change the displayName (using the same user account). So it doesn't seem to be a permissions issue. I wish I could see what that cmdlet is doing under the hood, as I'm sure that would give me everything I need, but not sure how to expose that either.
Directory.ReadWrite.All
orDirectory.AccessAsUser.All
scopes and received Admin Consent? - Marc LaFleur