Forum Discussion

omal's avatar
omal
New Member
2 months ago
Solved

Persistant failed refresh for odata from d365

{ error :{ code : DMTS_OAuthTokenRefreshFailedError , pbi.error :{ code : DMTS_OAuthTokenRefreshFailedError , parameters :{ EntraIdErrorCodes : AADSTS50173 }, details :[{ code : DM_ErrorDetailNameCode_UnderlyingErrorMessage , detail :{ type :1, value : AADSTS50173: The provided grant has expired due to it being revoked, a fresh auth token is needed. The user might have changed or reset their password. The grant was issued on 2026-04-21T05:21:57.1322655Z and the TokensValidFrom date (before which tokens are not valid) for this user is 2026-06-17T05:52:12.0000000Z . Trace ID: 7f9a06fd-5b21-413e-9b0f-e35628534400 Correlation ID: d9651761-a0f6-41c1-8130-833c54a0649e Timestamp: 2026-06-18 00:16:06Z }}], exceptionCulprit :1}}}

  • This is a credentials issue, not a refresh logic issue. AADSTS50173 means the refresh token tied to the D365 OData source was invalidated, usually because the account that signed into that data source had a password change, MFA reset, or had its sessions revoked by an admin. The TokensValidFrom timestamp in the error message tells you the exact cutoff.

    To fix it, open the semantic model in the Power BI Service, go to Settings, expand Data source credentials, click Edit credentials on the D365 OData source, sign in again with OAuth2, then run a refresh. Once a fresh token is issued, the scheduled refresh will start working again.

    One caveat: only the dataset owner can update those credentials. If the original owner cannot sign in (left the company, account disabled), use Take over from the dataset settings first, and then edit the credentials with the new owner.

    If this helped, please give it a thumbs up and mark it as the accepted solution.

    Thanks,
    Shai Karmani

    Let's connect in LinkedIn

6 Replies

  • This is a credentials issue, not a refresh logic issue. AADSTS50173 means the refresh token tied to the D365 OData source was invalidated, usually because the account that signed into that data source had a password change, MFA reset, or had its sessions revoked by an admin. The TokensValidFrom timestamp in the error message tells you the exact cutoff.

    To fix it, open the semantic model in the Power BI Service, go to Settings, expand Data source credentials, click Edit credentials on the D365 OData source, sign in again with OAuth2, then run a refresh. Once a fresh token is issued, the scheduled refresh will start working again.

    One caveat: only the dataset owner can update those credentials. If the original owner cannot sign in (left the company, account disabled), use Take over from the dataset settings first, and then edit the credentials with the new owner.

    If this helped, please give it a thumbs up and mark it as the accepted solution.

    Thanks,
    Shai Karmani

    Let's connect in LinkedIn

  • Hi omal 

     

    Further to what has been recommended, I would also suggest that you use a service account or service principal so that the token and username and password does not expire which is causing your current pain point.

  • Hi omal 

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.


    Thank you.

  • Hi omal 

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


    Thank you

    • omal's avatar
      omal
      New Member

      the issue is persistant