MetricSign
Start free
Medium severityauthentication

Power BI Refresh Error:
Failed to get access token by using service principal. ADAL Error: service_unavailable

What does this error mean?

The pipeline could not get an Azure AD token — the STS returned service_unavailable. This is a transient Azure AD outage; retry after a few minutes.

Common causes

  • 1Azure Active Directory is experiencing a transient outage or service degradation
  • 2The Microsoft identity platform endpoint is temporarily unavailable from the IR's network
  • 3DNS resolution for login.microsoftonline.com is failing from the integration runtime
  • 4A proxy or firewall is intermittently blocking requests to the Azure AD token endpoint
  • 5The Azure AD tenant has reached a service limit or throttling threshold

How to fix it

  1. 1Wait and retry — service_unavailable from Azure AD is usually transient and resolves within minutes.

Beyond the docs

Common practitioner solutions not covered in the official documentation.

  1. 1Add retry logic to the ADF pipeline: use retry settings on the activity (up to 3 retries with 30s delay)
  2. 2Check the Azure AD Service Health dashboard for any active incidents
  3. 3From the IR machine, test DNS: Resolve-DnsName login.microsoftonline.com
  4. 4Verify outbound HTTPS (port 443) to login.microsoftonline.com is not blocked by proxy or firewall

Frequently asked questions

Does this error affect all users or just the dataset owner?

The refresh runs under the dataset owner's OAuth token. Only the dataset owner needs to re-authorize — other users can still view existing report data.

How often do OAuth tokens expire in Power BI?

It depends on the connected service. Microsoft 365 tokens typically expire after 60–90 days of inactivity. SharePoint Online tokens may expire sooner if the organization's token lifetime policy is stricter.

Can I prevent this from happening again?

Use a service account (non-personal account) as the dataset owner for production datasets. Service account tokens don't expire due to password resets or departures.

Does this error appear in Power BI Desktop?

No — authentication errors of this type only occur during scheduled or manual refreshes in Power BI Service.

Source · learn.microsoft.com/en-us/fabric/data-factory/connector-troubleshoot-azure-data-lake-storage

Other authentication errors