Medium severityauthentication
Power BI Refresh Error:
FailedToGetOAuth2AccessToken
What does this error mean?
ADF could not acquire an OAuth2 access token for the linked service. This may be due to invalid client credentials, an unreachable token endpoint, or expired secrets.
Common causes
- 1Failed to obtain OAuth2 access token
- 2Integration runtime configuration is incorrect or outdated
- 3Authentication credentials or permissions are insufficient
- 4The feature or setting is not supported for the selected connector or copy mode
How to fix it
- 1Open the linked service and verify the token endpoint URL is correct and reachable — a wrong tenant ID in the token URL (e.g., https://login.microsoftonline.com/{tenantId}/oauth2/token) is a common cause.
- 2Check whether the client secret in the linked service has expired — go to Azure AD > App registrations > the app > Certificates & secrets to verify the expiry.
- 3Verify the IR can reach the OAuth2 token endpoint — if using a self-hosted IR, confirm the SHIR host machine has outbound HTTPS access to the authorization server (login.microsoftonline.com or the third-party OAuth endpoint).
- 4If credentials were recently rotated, update the linked service secret in ADF and save — ADF does not automatically pick up Azure Key Vault secret rotation; you must re-save the linked service to refresh the cached value.
- 5Test the linked service using 'Test connection' in ADF Studio after making changes — a successful test confirms the token acquisition works before the next pipeline run.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/connector-troubleshoot-guide