PowerApps : Custom Connector with MS Graph : How can I use Application permissions in my custom connector?

986 Views Asked by At

I am having trouble creating a PowerApps Custom Connector which allows me to access Microsoft Graph using APPLICATION permissions.

I have created my Azure AD App Registration, with three API permissions:

  • Delegated: User.Read
  • Application: User.Read.All
  • Application: Directory.Read.All

I have confirmed the Redirect URI is correctly set for Power Apps (https://global.consent.azure-apim.net/redirect) and I have generated a Client Secret.

I have then created TWO different Power Apps custom connectors, and both of them give me exactly the same results.

  1. Connector A: Auth Type: OAuth2.0

  2. Connector B: Auth Type: OAuth 2.0

I then setup (in both connectors) the same two actions:

  • /v1.0/me
  • /v1.0/users

In BOTH connectors the first action (/me) works .. and returns the details of the logged in user. The second connector (/users) returns "Access Denied - Insufficient Privileges".

This is telling me it is using the Delegated permissions (which allows it to retrieve /me) and not the Application permissions (which is why it can't list all of the user accounts).

So .. is there any setting in Power Apps which allows me to specify that this connector should use Application requests rather than delegated?

Thank you!

0

There are 0 best solutions below