Initiate a call to user in SPFX webpart in desktop Teams client
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
- [ ] 💥 Internet Explorer
- [ ] 💥 Microsoft Edge
- [ ] 💥 Google Chrome
- [ ] 💥 FireFox
- [ ] 💥 Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [ ] not applicable
- [X] other (enter in the "Additional environment details" area below)
Additional environment details
Native Teams client on Desktop (Windows)
Issue description
I have an SPFX webpart with list of users. I would like to initiate a Teams call with the user from the SPFX webpart.
As far as I investigated the samples, there is this URL format available: https://teams.microsoft.com/l/call/0/[email protected]
However when I click on the link with it in SPFX webpart, I am asked to confirm which Teams client I would like to use, this opens in browser. Then I need to confirm to proceed to Teams app.
So the experience is not seemless for the end user. However the same link works flawlessly on mobile Teams client in iOS. When I click the link, the popup to start the call shows directly in Teams client without the step in between.
Is it possible to initiate the call in desktop Teams without the additional step?
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
I am attaching the screenshot with the additional step between clicking the link and intiating the call.

@plodik - are you using Teams JS API to open a link? Or is it just an anchor element with href on the page?
I'd try using the API.
And, generally speaking, it's always an investigation on what format of the URL to use for this or that Teams's behavior.
@AJIXuMuK It is IconButton with Href to that URL. I will investigate Teams JS API, thanks for the hint.
This URL format is mentioned on many places including MS documentation as deep link to initiate the call, however without description of that step in between. It works OK on mobile Teams client but not on Desktop client - which is weird...
I have an update to this. I have tried the above mentioned teamsJS openDeepLink approach and it works!
So I can confirm: If the deeplink URL is opened directly as A href, it opens the browser and then goes back to Teams client to start a call or chat.
When the same URL is opened by calling openDeepLink method, it starts the chat or call immediately in the Teams client itself. This is the best behavior.
Thanks @AJIXuMuK!
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues