This repository of PowerShell sample scripts show how to access Intune service resources. They demonstrate this by making HTTPS RESTful API requests to the Microsoft Graph API from PowerShell.
MIT License
1.36k
stars
658
forks
source link
function Set-IntuneDevicePrimaryUser not working, Bad Request #240
Win10_PrimaryUser_Set.ps1
function Set-IntuneDevicePrimaryUser not working, throws,
Response content:
{"error":{"code":"BadRequest","message":"Write requests are only supported on contained entities or navigation properties with bindings.","innerError":{"date":"2023-02-23T16:
33:21","request-id":"95d961d2-843b-4d5e-9329-86ed60f5c9d1","client-request-id":"95d961d2-843b-4d5e-9329-86ed60f5c9d1"}}}
pheasant@domain.onmicrosoft.com AzureCloud c4401c5a-3f02-4a4a-a660-3943af27c558 domain.onmicrosoft.com User
Set-IntuneDevicePrimaryUser : Request to https://graph.microsoft.com/beta/deviceManagement/managedDevices('DEV_ID')/users/ failed with HTTP Status BadRequest Bad Request
Win10_PrimaryUser_Set.ps1 function Set-IntuneDevicePrimaryUser not working, throws, Response content: {"error":{"code":"BadRequest","message":"Write requests are only supported on contained entities or navigation properties with bindings.","innerError":{"date":"2023-02-23T16: 33:21","request-id":"95d961d2-843b-4d5e-9329-86ed60f5c9d1","client-request-id":"95d961d2-843b-4d5e-9329-86ed60f5c9d1"}}} pheasant@domain.onmicrosoft.com AzureCloud c4401c5a-3f02-4a4a-a660-3943af27c558 domain.onmicrosoft.com User
Set-IntuneDevicePrimaryUser : Request to https://graph.microsoft.com/beta/deviceManagement/managedDevices('DEV_ID')/users/ failed with HTTP Status BadRequest Bad Request