Hello PW-0446,
Thank you for your inquiry about your Teams app development issue!
Currently, redirects aren't supported for iframes or brokered apps. Ensure that you use MSAL.js in the top frame of the window if you use the redirect APIs or use the popup API.
Reference doc:-https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/authentication/tab-sso-overview#known-limitations
Also, here provides guidance for specific errors when signing into an application configured for SAML-based federated Single Sign-On with Microsoft Entra ID.