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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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 @Anonymous,

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.

Anonymous
Not applicable

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.