JayRHa / IntuneToolBox

MIT License
26 stars 1 forks source link

Application is not authorized to perform this operation #2

Closed hotzenwalder closed 2 years ago

hotzenwalder commented 2 years ago

When starting this tool as a Global Admin in our Tenant (and have all the rights in Intune/365/AAD) the toolbox says the application is not authorized to perform this operation, although we did authorize using a Global Admin account and Accepted all the required permissions for the app. Tried it with Visual Studio Code, Powershell ISE etc

The errors are

Get-MgUserPhotoContent : Accessing service failed. At C:\Tools\IntuneToolBox-main\modules\utility.psm1:232 char:7

Exception calling "ToBase64String" with "1" argument(s): "Value cannot be null. Parameter name: inArray" At C:\Tools\IntuneToolBox-main\modules\utility.psm1:234 char:3

Get-DecodeBase64Image : Cannot bind argument to parameter 'imageBase64' because it is an empty string. At C:\Tools\IntuneToolBox-main\modules\utility.psm1:235 char:66

Get-MgDeviceManagementManagedDeviceOverview : { "_version": 3, "Message": "Application is not authorized to perform this operation. Application must have one of the following scopes: DeviceManagementManagedDevices.Read.All, DeviceManagementManagedDevices.ReadWrite.All - Operation ID ( for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 2d354ac3-cffe-4ae6-b842-2e5695b1ff3d - Url: https://fef.amsub0102.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevi ceOverview?api-version=5022-05-24", "CustomApiErrorPhrase": "", "RetryAfter": null, "ErrorSourceService": "", "HttpHeaders": "{}" } At C:\Tools\IntuneToolBox-main\modules\pageMain.psm1:19 char:5

Schermafbeelding 2022-07-17 135118

JayRHa commented 2 years ago

I missed to add some permissions. Can you try if it works now?

hotzenwalder commented 2 years ago

Had two prompts for permissions this time, one where we could also give permission for the whole organization in our tenant. Seems to work now although we cannot click on anything on the Home screen

Schermafbeelding 2022-07-17 142018

In the Group MGMT section we can do some more. The view area size however is too small so we have to scroll left and right or resize some columns since we cannot resize the whole Intune Tool Box screen.

Tiny other issue. When there is no profile picture associated with the account you use to manage the toolbox, you receive an error

Get-MgUserPhotoContent : Accessing service failed. At C:\Tools\IntuneToolBox-main\modules\utility.psm1:232 char:7

Exception calling "ToBase64String" with "1" argument(s): "Value cannot be null. Parameter name: inArray" At C:\Tools\IntuneToolBox-main\modules\utility.psm1:234 char:3

Get-DecodeBase64Image : Cannot bind argument to parameter 'imageBase64' because it is an empty string. At C:\Tools\IntuneToolBox-main\modules\utility.psm1:235 char:66

Thanks for the quick response and all the efforts you make for the community.

JayRHa commented 2 years ago

Thank you for your feedback. I try to include this in the next version to give more possibilities to resize the screen. The bug with no profile picture I will fix until tomorrow.

JayRHa commented 2 years ago

Can you check the new version the bug is fixed an as already mention I will consider your feedback for the next version

hotzenwalder commented 2 years ago

Bug indeed fixed, can connect to our tenant, but the other issues remain (no resizing, cannot click on anything in home view)