12Knocksinna / Office365itpros

Office 365 for IT Pros PowerShell examples
MIT License
1.28k stars 567 forks source link

I think there's somthing wrong with the login url! #23

Closed mahmoudshoaala closed 3 years ago

mahmoudshoaala commented 3 years ago

Invoke-WebRequest : {"error":"unauthorized_client","error_description":"AADSTS700016: Application with identifier '60198040-e87c-4cb9-9e52-ce651d859704' was not found in the directory 'My Tenant ID'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.\r\nTrace ID: ef74e440-ce52-4830-8c9a-5d5a42013f00\r\nCorrelation ID: 091b1b89-9ae1-4b1c-9242-39899e611fc4\r\nTimestamp: 2021-03-12 20:10:09Z","error_codes":[700016],"timestamp":"2021-03-12 20:10:09Z","trace_id":"ef74e440-ce52-48 30-8c9a-5d5a42013f00","correlation_id":"091b1b89-9ae1-4b1c-9242-39899e611fc4","error_uri":"https: //login.microsoftonline.com/error?code=700016"} At C:\Users\Hanafi\Desktop\GetGraphUserStatisticsReport.PS1:27 char:17

12Knocksinna commented 3 years ago

The app you're trying to use doesn't have the right app id. Did you create an app in Azure AD and give it the right permissions?