For a customer I've created a SPFX webpart which shows a PowerApp using an iframe containing the PowerApp weblink. This works great in a browser scenario, but the teams client has a login issue.
When loading the personal app in Teams the power app loads but shows a sign in button (which is ok). When clicking the sign in button, a browser is opened and the user is logged in. Issue is the user won't be redirected back to teams, but the browser remains opened and loads the power app.
Is there a way to make the PowerApp working in this SPFX scenario in the Teams Client?
Also explored the (preview) @microsoft/powerappsplayersdk which basically results in the same outcome. The SDK also provides a getAccessToken method in which obtaining access tokens for resources can be implemented within the webpart, which in the end bypasses the sign in button, however this means ending up configuring a lot of permissions on the SPFX principal in Azure AD when using the SPFX TokenProvider.