Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AuRo
Regular Visitor

Azure AD authorization in OData data source: published report refresh problem

Hi,

my company has a self-developed and self-hosted OData service (asp.net core 5 odata), which uses Azure AD authentication. We need to use the data delivered by the web service in our PBI-Dashboards.

 

I managed to get it working in the PBI desktop application by following the answer in this SO-Problem (c# - Power Query/PowerBI connecting to Custom oDATA feed secured with AAD - Stack Overflow).

But now after publishing the PBI I'm getting the following error when refreshing the data source online:

AuRo_0-1623338383044.png

 

Last refresh failed: Thu Jun 10 2021 16:43:07 GMT+0200 
It looks like the refresh token expired. Please go to this dataset's settings page, and reenter the OAuth2 credentials for the OData data source.

Underlying error message:

AADSTS70000: Provided grant is invalid or malformed.

Trace ID: ...

Correlation ID: ...

Timestamp: 2021-06-10 14:43:07Z. https://login.windows.net/error?code=7000

 

The message confuses me, as a refresh token should not be present (or even expired) here at all. And the AADSTS70000 code gets me nowhere tbh. I guess that I have a wrong or missing setting in the app registration in Azure, but I have no idea what or where to look. So any help would be much appreciated.

 

What i tried so far:

3 REPLIES 3
pbiOrgUser
New Member

Hey @AuRo 
Any luck in resolving this?  We are getting the same error on power bi cloud and power bi desktop works perfectly fine (noting desktop is using Power Query for excel (a672d62c-fc7b-4e81-a576-e60dc46e951d).

When we deploy to power bi cloud and use power bi data refresh (b52893c8-bc2e-47fc-918b-77022b299bbc) we have this issue!

AuRo
Regular Visitor

Hi @v-yiruan-msft,

thanks for your reply, I've worked through these posts and got the following result:

  • Authentication via Postman/Insomnia works as expected.
  • Authentication via Power BI Desktop works as expected.
  • Authentication via app.powerbi.com fails with the same error as in my original post. Credentials are  the same as in the PBI Desktop connection.

Is there a way to debug or have a detailed log of the app.powerbi.com data source connection attempts? I guess that the error shown has no relation to an actual token refresh - as the data source connection never gets authorized, and the odata service never receives a request. Unfortunately I have no clue how to debug the app.powerbi.com-platform, nor do I know how to do this in the Azure portal. It would be really useful to know what the auth-request from app.powerbi.com to Azure AD looks like.

v-yiruan-msft
Community Support
Community Support

Hi @AuRo ,

Please review the content in the following links, hope they can help you.

Azure Graph API 2.0 error in refreshing token: Provided grant is invalid or malformed (AADSTS70000)

invalid grant when trying to get token for azure AD graph api

Best Regards

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.