Guest Access not supported if SharePoint Online Website Name differs from Tenant Name

Problem

This problem only occurs when the SharePoint Online public website name does not match the Microsoft 365 tentant name.

This is a very rare scenario since creating an alias has been disabled since March 2015 (see SharePoint Online Public Websites to be discontinued).

Although your organizations SharePoint is configured to allow External sharing your registered guests will not be able to see the content of configured lists or documents in the Confluence macros. This problem occurs even if they should have access to these lists or documents in SharePoint itself.

Cause

In order to provide guest access, the app must be able to resolve different tenants based on their names. Unfortunately the current implementation requires the SharePoint domain to match the default Azure AD domain provided by Microsoft when creating a new tenant (that’s the default behaviour when not using aliases).

The default case should look like this:

Azure AD Domain: contoso.onmicrosoft.com
SharePoint Domain: contoso.sharepoint.com

In case you are using a SharePoint alias the domains will not match anymore. The app will then fall back into the behaviour of using the home tenant of the current user. Therefore guest access will not work in case you are using an alias.

For a bit more background see also