pnp / sp-dev-fx-webparts

SharePoint Framework web part, Teams tab, personal app, app page samples
http://aka.ms/spfx-webparts
MIT License
2.04k stars 3.85k forks source link

React-Enhanced-PowerApps not loading in Teams desktop Tab #1679

Closed vysta closed 2 years ago

vysta commented 3 years ago

Sample: react-enhanced-powerapps

Author

@hugoabernier

Expected Behavior

Display on SPO page in Teams (desktop) Tab

Observed Behavior

Any PowerApps on SPO page added using this web part does not load in the Desktop version of Teams. It displays “Sign-In” option, which launches browser and the PowerApp but does not load in Teams Desktop

Steps to reproduce the behavior:

  1. Add Canvas PowerApp to SPO page using React-Enhanced-Powerapps web part (web link or App ID)
  2. Authenticate/Approve. PowerApp loads as expected on SPO page
  3. Add a new Tab in MSFT Teams (either SP or Web Page) and use the SPO page with PowerApps
  4. Launch New Page in Teams Web App > go to New Tab with SPO page. PowerApps load as expected.
  5. Launch New Page in Teams Desktop App > go to New Tab with SPO page. Page loads but PowerApps do not authenticate or Load
  6. Select “Sign-In” on the PowerApp > from the page displayed in Teams Desktop. It launches a browser and displays the single PowerApp.
  7. Refresh view in Teams desktop and PowerApp still does not authenticate or display in the Teams desktop New Tab Page.

Environment Details: Deployed in SPO modern page and Teams Desktop latest version.

View in Teams Desktop

Some are getting an error trying to authenticate... Unable to obtain access token for resource 'https://service.powerapps.com/'. Error from ADAL.js: login_required (AADSTS50058: A silent sign-in request was sent but no user is signed in. Trace ID: 87b8c57c-59b9-4375-961a-9e6f8b33b100 Correlation ID: dc848909-70aa-47b9-b32c-330c7f514c8a Timestamp: 2021-01-20 17:30:39Z).

ghost commented 3 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

hugoabernier commented 3 years ago

Thanks for your feedback @vysta. I must admit that I didn't plan for this web part to be used within Teams (because they already provide Power Apps support), but it didn't occur to me that it would be used in an embedded page within Teams.

If anyone has any idea how to solve this issue, I'd love the help

hugoabernier commented 3 years ago

@vysta I've investigated into it a little more, and it looks like we won't be able to fix this issue until after SPFx 1.12 is released, which should help resolve some authentication issues.

On a related note, this issue will also most likely occur within the mobile app as well.

I've assigned myself to this and will circle back when SPFx 1.12 is released.

siddharth-vaghasia commented 2 years ago

@all - I can confirm this issue is fixed after upgrading the SPFx version to 1.13.1...

thanks @kunj-sangani for the PR :)

chandrasekarannageswaran commented 2 years ago

Hi @siddharth-vaghasia I used this webpart (version 1.2.0) in the SharePoint modern site page, but the 'Sign-In' issue still persists in Teams app particularly in Viva Connections teams desktop app. Anything I am missing here?

Thanks Chandrasekaran

vysta commented 2 years ago

@hugoabernier you closed this but it is not "Completed" the prior fix provided by @siddharth-vaghasia had been working but some change has now caused the issue to reappear. The issue is happening again for Teams Desktop.