SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 1.01k forks source link

Azure AD authentication with seamless sign on: undefined tenant passed to AAD endpoint #4716

Open JeanCloud365 opened 5 years ago

JeanCloud365 commented 5 years ago

Category

Expected or Desired Behavior

When a webpart authenticates with a backend Api secured by Azure AD, a token is obtained and used by the AadClient of SPFx. Even if the tenant is using seamless signon where the token request passes the https://autologon.microsoftazuread-sso.com/ endpoint.

Observed Behavior

In some cases, the tenant parameter needed by https://autologon.microsoftazuread-sso.com is passed as 'undefined'. Example: https://autologon.microsoftazuread-sso.com/undefined/winauth/ssoprobe?client-request-id=719482f2-1966-4d1e-8040-0562db4e975e&_=1570098222065

This causes the following HTTP 400 error: AADSTS90002: Tenant 'undefined' not found. This may happen if there are no active subscriptions for the tenant. Check with your subscription administrator.

This causes no token to be produced, causing a timeout in the SPFx middleware after 3 retries (which all result in the HTTP 400 error above).

The following error is produced in the browser console afterwards:

'Token Renewal Operation failed due to timeout'

Steps to Reproduce

The issue cannot be reproduced reliably. It only seems to popup with users having a Seamless SignOn enabled tenant.

msft-github-bot commented 5 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

hajekj commented 8 months ago

Any update @andrewconnell? We are hitting this issue as well...

/cc: @macewindu1

andrewconnell commented 8 months ago

@hajekj Sorry, I can't provide an update as I don't work for Microsoft & thus can't speak on their behalf for issues/errors.

I just helped label the issue.

justin376802 commented 8 months ago

I am also facing this issue, is it still being reviewed?