Hi @Anonymous
If you want to access the guest user's original mailbox domain name, simply change /{tenant id}
to /common
to bypass tenant-level login. Before doing so, make sure your application is registered as: Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).
Next use the auth code flow for interactive logins to get an access token.
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?
client_id=client id
&response_type=code
&redirect_uri=redirect url
&response_mode=query
&scope=https://graph.microsoft.com/IMAP.AccessAsUser.All
&state=12345
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.