web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Issue while executing ...
Power Automate
Unanswered

Issue while executing an HTTP call using Invoke an HTTP request action in Power Automate

(0) ShareShare
ReportReport
Posted on by

Hello All,

I am trying to get all the User Admin Roles which are there in Microsoft 365 Admin Center in the Power Automate. For getting the Admin Roles I am first using https://graph.microsoft.com/v1.0/directoryRoles API to get all the Directory Roles then I will be running an Apply to each loop with the roles which I get from the above API as a parameter in this API "https://graph.microsoft.com/v1.0/directoryRoles/{role id}/members?$select=id,userPrincipalName".

By using the above APIs I can get the User Admin Roles in Power Automate. But now, I am facing an issue while executing the https://graph.microsoft.com/v1.0/directoryRoles API using the Invoke an HTTP request action. Please refer below error details for same.

{
  "error": {
    "code": "Authorization_RequestDenied",
    "message": "Insufficient privileges to complete the operation.",
    "innerError": {
      "date": "2021-11-16T09:56:16",
      "request-id": "bdb6ce9c-4a93-4726-8cec-166c477f3ba5",
      "client-request-id": "bdb6ce9c-4a93-4726-8cec-166c477f3ba5"
    }
  }
}
I am not using any Azure App Registration ID/Client ID for connection. I am only using details which are shown in below screenshot for creating connection.
office_user_0-1637069423374.png

Also, I have Granted Admin Consent for Graph Explorer in the Azure AD. Please refer below screenshot for same.
FYI: My account is having Global Administrator permission level as well.

office_user_1-1637070253948.png

Please help me to find the solution for this issue.

Thanks & Regards,
Abhishek

Categories:
  • Syed_Ahmad_ Profile Picture
    8 on at

    Hi @office_user 

    Please add these API Permission in Azure Registered App :'

    Delegated

    Organization.Read.All
    Directory.Read.All
    Directory.AccessAsUser.All


    Applicattion

    Organization.Read.All
    Directory.Read.All

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard