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.
From
$Resource = "deviceManagement/managedDevices/('$IntuneDeviceId')/users/$ref" TO $Resource = "deviceManagement/managedDevices/$IntuneDeviceId/users/$ref"
From $Resource = "deviceManagement/managedDevices/('$IntuneDeviceId')/users/
$ref" TO $Resource = "deviceManagement/managedDevices/$IntuneDeviceId/users/
$ref"