Gerenios / AADInternals

AADInternals PowerShell module for administering Azure AD and Office 365
http://aadinternals.com/aadinternals
MIT License
1.24k stars 214 forks source link

Set-AADIntDeviceCompliant Insufficient privileges to complete the operation #8

Closed pawp81 closed 2 years ago

pawp81 commented 3 years ago

After enrolling device to Intune if I try to set it as compliant with Set-AADIntDeviceCompliant I receive following error: Invoke-RestMethod : {"odata.error":{"code":"Authorization_RequestDenied","message":{"lang":"en","value":"Insufficient privileges to complete the operation."},"requestId":"7f1ca352-fcb8-4f69-bbef-f47eda0beb69","date":"2021-03-24T18:37:56"}} At C:\Program Files\WindowsPowerShell\Modules\AADInternals\0.4.6\MDM.ps1:795 char:9

What permissions user needs to have to run Set-AADIntDeviceCompliant?

uzmest commented 3 years ago

Same error here as a GA : Invoke-RestMethod : {"odata.error":{"code":"Authorization_RequestDenied","message":{"lang":"en","value":"Insufficient privileges to complete the operation."},"requestId":"3c9XXXXXXX6e","date":"2021-05-07T18:20:54"}} Au caractère C:\Program Files\WindowsPowerShell\Modules\AADInternals\0.4.6\MDM.ps1:795 : 9

NestoriSyynimaa commented 3 years ago

Sorry for the late response, I didn't receive any notifications due to misconfigured settings. Anyways, I'll have a look at this some point later this week. Global Admin should have all permissions, so probably Microsoft have made some changes. I assume they have limited this to certain clients (and/or custom apps).