microsoftgraph / powershell-intune-samples

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 657 forks source link

Where is the documentation ? #277

Open martintamare opened 1 month ago

martintamare commented 1 month ago

Hello there,

I'm trying to find the documentation associated to this call in Win10_PrimaryUser_Set.ps1 (https://github.com/microsoftgraph/powershell-intune-samples/blob/master/ManagedDevices/Win10_PrimaryUser_Set.ps1)

$graphApiVersion = "beta"
$Resource = "deviceManagement/managedDevices('$IntuneDeviceId')/users/`$ref"
...
$uri = "https://graph.microsoft.com/$graphApiVersion/$($Resource)"

$userUri = "https://graph.microsoft.com/$graphApiVersion/users/" + $userId

$id = "@odata.id"
$JSON = @{ $id="$userUri" } | ConvertTo-Json -Compress

Invoke-RestMethod -Uri $uri -Headers $authToken -Method Post -Body $JSON -ContentType "application/json"

I did not find anything anywhere : any pointers ?