
Hi @Enrico Rossini
Thank you for posting your question on the Microsoft Q&A Forum.
Based on my research, Excel Add-ins are displayed inside a task pane, which is essentially hosted inside an iframe. Many identity providers, including Microsoft Entra ID, appear to block sign-in pages from loading inside iframes for security reasons. So if you try to sign in directly within the task pane, it may not work as expected.
It also seems that this isn’t limited to Excel on the web. On the desktop version of Excel, the add-in runs inside a built-in browser control called a webview. While it’s not an iframe, it can still have security restrictions that interfere with sign-in flows, especially those involving redirects or cookies.
To make authentication work smoothly across both web and desktop platforms, Microsoft recommends using the Office Dialog API. This API lets you open a separate browser window where the sign-in page can load properly. After the user signs in, you can pass the result back to the task pane using a simple messaging method.
You can find the article for more information: Authenticate and authorize with the Office dialog API - Office Add-ins | Microsoft Learn
I hope this helps you. If you have any other questions, please feel free to let me know.
If the answer is partially 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.