Seamless SSO issues in Safari

Copper Contributor

I have a SharePoint online site that has several aadHttpClient API calls that run on page load on each page. The site works just fine in Edge, Chrome, and Firefox but it throws the following error in Safari on desktop and iOS. It seems to fix itself after refreshing the page several times but we don't want our clients having to do that each time. I'm using the same account in all browsers but it only happens in Safari. Does anyone know what's happening and know how to fix it? Thanks.

 

InteractionRequiredAuthError: Seamless single sign on failed for the user. This can happen if the user is unable to access on premises AD or intranet zone is not configured correctly

 

Here is my aadHttpClient code. The error is being thrown in the catch statement.

 

Context.aadHttpClientFactory
   .getClient(Settings.AZURE_SHAREPOINT_APP_REG_CLIENTID)
    .then((client: any): void =>
     {
         client
         .post(URL, AadHttpClient.configurations.v1, HttpClientOptions)
         .then((res: any) =>
         {
             res.json().then((result: any) =>
             {
                 console.log("GetAPIData result (" + URL + "): " + JSON.stringify(result));
                 resolve(result);
             });
         });
   }).catch(error =>
     {
         console.log("GetAPIData error (" + URL + "): " + error);
  });

 

1 Reply
This article contains a workaround and solution for this issue:
https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/2372