Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teams context on iOS has invalid teamsSiteUrl with 2024-MarT2 update #2266

Open
nbelyh opened this issue Apr 11, 2024 · 8 comments
Open

Teams context on iOS has invalid teamsSiteUrl with 2024-MarT2 update #2266

nbelyh opened this issue Apr 11, 2024 · 8 comments

Comments

@nbelyh
Copy link

nbelyh commented Apr 11, 2024

The problem started with Teams 2024 March T2 update.
On iOS, now it turned out to be NOT THE TEAMS SITE URL passed in context, but a URL to a web page on the root site.

Was (correct, also correct on all other Teams client versions, i.e. Android/Desktop/Web):
https://something.sharepoint.com/sites/TeamSite

Now (iOS, after March 2024 update):
https://something.sharepoint.com/_layout/15/sharepoint.aspx

This is causing a problem in our application, because it assumes that teamsSiteUrl contains a URL of teams site, not a page.
Would appreciate some ideas for workarounds (how do I get the team site).

In the documentation, it is also stated that the old way is correct:
https://learn.microsoft.com/en-us/javascript/api/@microsoft/teams-js/microsoftteams.context?view=msteams-client-js-1.13.1#@microsoft-teams-js-microsoftteams-context-teamsiteurl

image

This property should not be some a page on a root site, this should be a team site url.

@nbelyh nbelyh changed the title SharePoint Application authorization fails with iOS Client 2024-MarT2 update Teams context on iOS has invalid teamsSiteUrl with 2024-MarT2 update Apr 11, 2024
@Prasad-MSFT
Copy link

@nbelyh - Thanks for raising your issue. We will check this at our end and will update you accordingly.

@Prasad-MSFT
Copy link

@nbelyh - Just to be sure, are you testing using @microsoft/teams-js": "^1.13.1 or Teams JSv2?

In Teams JSv2 it is referred as sharepointSite.url

@nbelyh
Copy link
Author

nbelyh commented Apr 15, 2024

@Prasad-MSFT
1.13.1 (our app is still on 1.x branch). But I don't think there is difference, as it's only on iOS.

As a temporary workaround, we used this:

    if (context.teamSiteUrl.endsWith('.aspx')) {
      const origin = UrlService.getOrigin(siteUrl);
      const teamSite = context.channelRelativeUrl.split('/').slice(0, 3).join('/');
      siteUrl = `${origin}${teamSite}`
    }

@Prasad-MSFT
Copy link

@nbelyh - We have raised a bug for the same. We will inform you once we get any further update from engineering team.

Thanks!

@otahi
Copy link

otahi commented May 20, 2024

@Prasad-MSFT
Hi,
At this stage, it seems that the issue occurs inconsistently, with some users experiencing it while others do not.

I have a few questions regarding this issue:

  1. Although there might already be some measures in place, is there any information you can share about the current status or actions taken?
  2. Is there an estimated timeline for when all the measures will be fully implemented and the issue resolved?

Thank you for your support.

@Prasad-MSFT
Copy link

@otahi - Apologies. Engineering team is currently working on the fix, however there is no ETA to share at the moment. We will inform you once we have any update. Thanks!

@otahi
Copy link

otahi commented May 21, 2024

@Prasad-MSFT Thank you for the reply. I appreciate your efforts and will await further updates.

@Prasad-MSFT
Copy link

@nbelyh , @otahi - We got update from engineering team that the issue has been fixed.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants