cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
johnguilbert190
Level: Powered On

MS Flow HTTP Request unable to access Azure Function using AD Authentication. Bad Gateway: You do not have permission to view this directory or page

Hi,

I have an Azure function that uses Azure AD Account Authorisation, but I am unable to connect to it from an MS Flow using HTTP Request. I just keep getting the error:

BadGateway. Http request failed as there is an error getting AD OAuth token: 'Failed to extract error details from response content 'You do not have permission to view this directory or page.'.'.

I have AD OAuth Selected and filled in all the fields as per Logic App Example. Even though this is an MS Flow.

Is this to do with the Web.Config in the Azure Function or permissions elsewhere in Azure (API Perms etc)?

Any help appreciated?

Thanks.

John.

2 REPLIES 2
tfhegdbn
Level: Powered On

Re: MS Flow HTTP Request unable to access Azure Function using AD Authentication. Bad Gateway: You do not have permission to view this directory or page

 

Hi,

 

It seems that this seems to be a permission-caused error. Have you tried to do similar tests with the credentials of a user with full permission?

 

johnguilbert197
Level: Powered On

Re: MS Flow HTTP Request unable to access Azure Function using AD Authentication. Bad Gateway: You do not have permission to view this directory or page

Not tried that. We discussed today and I think this is the issue. Admin has to give permissions for access api. Currently only Contribute Access as Owner of App in App Registration.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,719)