Authentication issue while calling Graph Explorer via HTTP action

%3CLINGO-SUB%20id%3D%22lingo-sub-2285509%22%20slang%3D%22en-US%22%3EAuthentication%20issue%20while%20calling%20Graph%20Explorer%20via%20HTTP%20action%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2285509%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20am%20running%20a%20query%20for%20exporting%20device%20compliance%20reports%20via%20graph%20explorer%20in%20the%20HTTP%20action%20in%20the%20playbook.%3C%2FP%3E%3CP%3EBut%20all%20I%20am%20getting%20is%20the%20authentication%20issue%2C%20no%20matter%20what%20account%20I%20use%20for%20it.%3CBR%20%2F%3EI%20tried%20using%20'Basic'%20and%20'OAuth'%20both%2C%20but%20none%20of%20them%20works.%3CBR%20%2F%3EScreenshot%20attached.%20Please%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CIMG%20border%3D%220%22%20alt%3D%2290736-image.png%22%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291030%22%20slang%3D%22en-US%22%3ERe%3A%20Authentication%20issue%20while%20calling%20Graph%20Explorer%20via%20HTTP%20action%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291030%22%20slang%3D%22en-US%22%3ECheck%20out%20this%20article%2C%20you%20need%20to%20use%20Active%20Directory%20Auth%3A%20%3CA%20href%3D%22https%3A%2F%2Fgregramsey.net%2F2020%2F04%2F07%2Fhow-to-use-logic-apps-to-query-intune-for-device-information%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgregramsey.net%2F2020%2F04%2F07%2Fhow-to-use-logic-apps-to-query-intune-for-device-information%2F%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291437%22%20slang%3D%22en-US%22%3ERe%3A%20Authentication%20issue%20while%20calling%20Graph%20Explorer%20via%20HTTP%20action%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291437%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F186539%22%20target%3D%22_blank%22%3E%40Thijs%20Lecomte%3C%2FA%3E%26nbsp%3B%2C%20Thanks%20for%20your%20response.%3C%2FP%3E%3CP%3EFollowed%20that%20step%20but%20got%20the%20below%20error%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%22Message%5C%22%3A%26nbsp%3B%5C%22Application%26nbsp%3Bis%26nbsp%3Bnot%26nbsp%3Bauthorized%26nbsp%3Bto%26nbsp%3Bperform%26nbsp%3Bthis%26nbsp%3Boperation.%26nbsp%3BApplication%26nbsp%3Bmust%26nbsp%3Bhave%26nbsp%3Bone%26nbsp%3Bof%26nbsp%3Bthe%26nbsp%3Bfollowing%26nbsp%3Bscopes%3A%26nbsp%3BDeviceManagementApps.Read.All%2C%26nbsp%3BDeviceManagementApps.ReadWrite.All%2C%26nbsp%3BDeviceManagementConfiguration.Read.All%2C%26nbsp%3BDeviceManagementConfiguration.ReadWrite.All%2C%26nbsp%3BDeviceManagementManagedDevices.Read.All%2C%26nbsp%3BDeviceManagementManagedDevices.ReadWrite.All%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Yash_Mudaliar_0-1619434898682.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275559i37648BFE537380F8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Yash_Mudaliar_0-1619434898682.png%22%20alt%3D%22Yash_Mudaliar_0-1619434898682.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291556%22%20slang%3D%22en-US%22%3ERe%3A%20Authentication%20issue%20while%20calling%20Graph%20Explorer%20via%20HTTP%20action%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291556%22%20slang%3D%22en-US%22%3EWhat%20permissions%20have%20you%20configured%20in%20your%20app%3F%20Did%20you%20add%20the%20permissions%20the%20error%20codes%20in%20mentioning%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2301014%22%20slang%3D%22en-US%22%3ERe%3A%20Authentication%20issue%20while%20calling%20Graph%20Explorer%20via%20HTTP%20action%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2301014%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F186539%22%20target%3D%22_blank%22%3E%40Thijs%20Lecomte%3C%2FA%3E%26nbsp%3B%2C%20Thank%20you%20for%20your%20previous%20reply.%20It%20was%20really%20helpful.%3C%2FP%3E%3CP%3EI%20got%20that%20point%20sorted.%20I%20got%20all%20the%20needed%20permissions%20for%20the%20app%20from%20which%20I%20used%20the%20secret.%20Screenshot%20attached.%3C%2FP%3E%3CP%3EStill%20I%20get%20the%20very%20same%20error.%20Do%20you%20have%20any%20other%20idea%20on%20how%20to%20resole%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Yash_Mudaliar_0-1619596535117.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276202i934374B87A9B978F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Yash_Mudaliar_0-1619596535117.png%22%20alt%3D%22Yash_Mudaliar_0-1619596535117.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello,

I am running a query for exporting device compliance reports via graph explorer in the HTTP action in the playbook.

But all I am getting is the authentication issue, no matter what account I use for it.
I tried using 'Basic' and 'OAuth' both, but none of them works.
Screenshot attached. Please help.

6 Replies

@Thijs Lecomte , Thanks for your response.

Followed that step but got the below error: 

 

"Message\": \"Application is not authorized to perform this operation. Application must have one of the following scopes: DeviceManagementApps.Read.All, DeviceManagementApps.ReadWrite.All, DeviceManagementConfiguration.Read.All, DeviceManagementConfiguration.ReadWrite.All, DeviceManagementManagedDevices.Read.All, DeviceManagementManagedDevices.ReadWrite.All
 

Yash_Mudaliar_0-1619434898682.png

 

What permissions have you configured in your app? Did you add the permissions the error codes in mentioning?

@Thijs Lecomte , Thank you for your previous reply. It was really helpful.

I got that point sorted. I got all the needed permissions for the app from which I used the secret. Screenshot attached.

Still I get the very same error. Do you have any other idea on how to resole this?

 

Yash_Mudaliar_0-1619596535117.png

 

The permissions seem correct now. Could you share a screenshot of the Playbooks with the steps?

Sure @Thijs Lecomte , here it is:

JFYI, the URI in the HTTP connector is a 'GET' action that gives me the device compliance report when I run it in Graph Explorer, so the query is not a problem.

 

Yash_Mudaliar_0-1619966005525.png