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

app.openlink on a msteams calendar event does nothing on M365 app on iOS #2497

Open
RichieMcCaff opened this issue Sep 4, 2024 · 5 comments

Comments

@RichieMcCaff
Copy link

A recent issue was pointed out to us during an app submission to the teams store and it seems like a bug with teams-js

Portions of our app to will try scheduling content using task deeplinks that link directly to the teams calendar app.
At it's simplest it will call something like this:
app.openLink(https://teams.cloud.microsoft/l/meeting/new?subject=test)

It's only accessible if the teams-js initialises successfully and the calendar module in teams-js is not supported (we will first try use the calendar module which is only supported in Outlook right now)

This openlink when triggered from M365 will work on it's web version as it will successfully open as a new tab but when used within the M365 ios app it will do nothing.

Is there any supported way to use scheduling in M365 and if not is there a way to determine the app is within M365 so we can just disable scheduling features?

@AE-MS
Copy link
Contributor

AE-MS commented Sep 4, 2024

A recent issue was pointed out to us during an app submission to the teams store and it seems like a bug with teams-js

Portions of our app to will try scheduling content using task deeplinks that link directly to the teams calendar app. At it's simplest it will call something like this: app.openLink(https://teams.cloud.microsoft/l/meeting/new?subject=test)

It's only accessible if the teams-js initialises successfully and the calendar module in teams-js is not supported (we will first try use the calendar module which is only supported in Outlook right now)

This openlink when triggered from M365 will work on it's web version as it will successfully open as a new tab but when used within the M365 ios app it will do nothing.

Is there any supported way to use scheduling in M365 and if not is there a way to determine the app is within M365 so we can just disable scheduling features?

Using the isSupported method on the calendar capability should be sufficient for you to tell at runtime whether or not scheduling features should be disabled. Unfortunately, as you have discovered, Teams has not fully implemented the calendar capability at this time, but you can access partial functionality by using the backwards-compatible deep link syntax.

The best solution I can offer right now is to check calendar.isSupported() first. If it's supported, use that. If it's not supported, check if app.getContext().app.host.name === HostName.teamsModern and if it is, use the deep link. Otherwise assume it's not supported.

Normally we do not recommend switching runtime behavior based on the host name like this, since it is brittle, but until Teams is able to implement the calendar capability this is the best option I can offer.

Does that help?

@RichieMcCaff
Copy link
Author

@AE-MS Sorry I complicated things by bringing up the calendar module, we are not having any issues with that module.
I was just pointing out we have already tried using it and we have it being actively used when the app is used in Outlook only where isSupported is true.

The issue we have is with app.openLink("DEEPLINK") not working on the M365 app in iOS. Specifically when using this to open a deeplink to the teams calendar compose meeting action.

@AE-MS
Copy link
Contributor

AE-MS commented Sep 6, 2024

@AE-MS Sorry I complicated things by bringing up the calendar module, we are not having any issues with that module. I was just pointing out we have already tried using it and we have it being actively used when the app is used in Outlook only where isSupported is true.

The issue we have is with app.openLink("DEEPLINK") not working on the M365 app in iOS. Specifically when using this to open a deeplink to the teams calendar compose meeting action.

Unfortunately Teams deeplinks are not supported in the M365 app in iOS. In the future, the M365 app might choose to support calendar functionality via the calendar capability, but today they don't support any calendaring whether via calendar or via deeplink. I will ensure this gets added to their feature request list.

Obviously it doesn't help you get what you want but does that help at least explain the situation?

@RichieMcCaff
Copy link
Author

Not exactly, I always assumed the teams deeplink would not be supported by M365.
The main issue I see here is M365 has different behaviour on the iOS app compared to what it does on other platforms.
It will attempt to open the link in an external browser on other platforms but on iOS it won't.

I guess if that is not feasible is there any support for checking that M365 is the active platform through teams-js?

@AE-MS
Copy link
Contributor

AE-MS commented Sep 6, 2024

You can use the same check I suggested above but compare to office instead of teamsModern:

app.getContext().app.host.name === HostName.office

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

3 participants