migueesc123 / PowerBIRESTAPI

A Microsoft Power BI Data Connector or Power Query Connector for the Power BI REST API
MIT License
234 stars 74 forks source link

New mez: Authentication AAD #66

Closed shruthiMoti closed 3 years ago

shruthiMoti commented 3 years ago

Hi,

After the Authntication is changed to AAD. I am getting below error: The application 'Microsoft Power Query for Excel' asked for scope 'user_impersonation' that doesn't exist on the resource.

Is it possible to set any other scope. oauth2Permissions in my APP does not have value to be 'user_impersonation'

Thanks in Advance, Shruthi

migueesc123 commented 3 years ago

Hey! That’s pretty odd. The AAD authentication uses a first party application directly from Microsoft. We don’t own that application and the whole flow has been setup by Microsoft. The only thing that the connector does is define what resourceUrl we need the permissions to in order to query the Power BI REST API. I haven’t been able to repro this issue, so I’m not sure how to proceed with this one.

You might want to get in touch directly with the Microsoft team on their custom connectors repo to get to the bottom of it or roll back the previous version of the connector that can use your own application.

shruthiMoti commented 3 years ago

Hi,

When you said it is pre configured by Microsoft. Is the setting only for resourceUri = "https://analysis.windows.net/powerbi/api"; or can it be applied to others as well. I am trying to use my own API as resource.

migueesc123 commented 3 years ago

Hey @shruthiMoti ! I'd recommend that you check out their official documentation for their implementation. Below is the link to that documentation: https://docs.microsoft.com/en-us/power-query/handlingauthentication#azure-active-directory-authentication

Hope this helps!