cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
quentin-roger
Frequent Visitor

Active directory custom connector : you do not have permission to view this directory or page.

Hi,

We continue to have authentication problems with OAuth Custom Connector, as mentionned in this post we encounter issue when we are trying to use OAuth Generic Connector.

 

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/When-using-Oauth2-generic-connector-...

 

Se we tried to use the Azure active directory connector, but we found out new issue. This time the connection was created successfully, but when we try to call our api we receive a generic error.

 

See screenshots below :

 

powerapps_2_1.pngpowerapps_2_2.pngpowerapps_2_3.png

 

 

When we are trying our api we receive from the connector Test Page :

 

You do not have permission to view this directory or page.

 

I checked the bearer token sent to the Api and it seems that it doesn't send the good audience in the bearer token :

powerapps_2_4.png

 

When we are getting the token from PostMan the audience is the ressource the token is intented for.

 

powerapps_2_5.png

 

What am I missing ? Or do I misunderstand something ? 

 

Thanks.

 

 

2 REPLIES 2
v-yutliu-msft
Community Support
Community Support

Hi @quentin-roger ,

Do you mean that you have to permission to your api connector?

Please check:

whether you have added the resource as an audience in your App Service authentication configuration

I also find some docs about how to grant permissions to users to use the Azure AD connector  for your reference:

https://alextofan.com/2019/02/06/how-to-grant-permissions-to-users-to-use-the-azure-ad-connector-in-...

https://sachinbansal.blog/2018/08/23/powerapps-secure-your-azure-function-and-custom-connector-with-...

https://sharepoint-specialist.nu/custom-connector-authentication-to-the-graph-microsoftflow-468b494d...

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @quentin-roger how are you progressing with this? Was the above reply helpful?

 

@Anonymous 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (74,782)