A Teams external access whitelist controls the domains that users can connect to for federated chats. Organizations often limit federation using a whitelist to reduce the possibility of attacks through chat communications. This article explains how administrators can discover the set of domains users chat with by analyzing chat information using the Microsoft Graph PowerShell SDK.
The Teams external access configuration includes an allow list that defines which Microsoft 365 tenants are allowed to collaborate with your users through chats and meetings. To make sure that your allow list is complete, we can check the guest accounts present in the tenant and update the configuration with the domains used by guests. All in a matter of some straightforward PowerShell code.