cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Oeskandarian
Frequent Visitor

ht Opening MS Teams from Employee Directory

Hi,

I'm working on an Employee directory; everything works fine except for one thing. I want to be able to open MS Teams chat when I click on the chat icon. I use Launch("msteams://"), and when I click on the icon (Chat Icon), MS teams open with whoever I chatted recently. I want to open the user that I search in the Employee Directory. Please see the attached. Right now, the email icon works the way I wanted to be. When I click on the "Envelope" icon, Outlook opens with whoever I search in the Employee Directory. I'm using this formula: Launch("mailto:"&First(EmployeeProfile).Mail)

I'm hoping maybe there is a formula for MS Teams that has the same behavior. 

 

 

Thank you,

 

Oshin, 

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Oeskandarian ,

 

Please try this:

 

Launch("msteams://teams.microsoft.com/l/chat/0/0?users="& ThisItem.Email )

Hope this helps.
Sik

View solution in original post

5 REPLIES 5
v-siky-msft
Community Support
Community Support

Hi @Oeskandarian ,

 

Please try this:

 

Launch("msteams://teams.microsoft.com/l/chat/0/0?users="& ThisItem.Email )

Hope this helps.
Sik

Thanks for the reply. I try and got an error message under Action > OnSelect (please see the attached)

It reads Name isn't valid. This identifier isn't recognized (under ThisItem.Email)

v-siky-msft
Community Support
Community Support

Hi @Oeskandarian ,

 

Ok, I thought the icon was located in the EditForm. 

The correct pattern to launch Team resembles as follows:

Launch("msteams://teams.microsoft.com/l/chat/0/0?users=user@domain.com")

 

You just need to modify the user's email to fit your scenario. It seems User's Email is shown in a Label, so try this:

Launch("msteams://teams.microsoft.com/l/chat/0/0?users=" & EmailLabel.Text)

 

Sik

 

Thanks for the reply.
Here's how I get the information for the IM label:
Under the Advanced > Test> First(EmployeeProfile).Mail
I feel like I didn't give you enough information. Please see the attached screenshots from both Textbox & Message Icon. I think the way I'm displaying the user's email address doesn't work with the suggested pattern. I can change how I get the information for the IM textBox. I appreciate your help. I have another attachment from email icon; that one works fine( when I click on the email icon, Outlook opens with the user email already filed). I was hoping If I could copied the same function, but it didn't work for Teams. your function/pattern work if I remove &EmailLabel.Text. it opens Teams but whoever I chatted last not that specific user I search in the app.

 

 

Employee Directory - IM Box.jpg

 

 

Employee Directory -Icon.jpg

 

 

 

 

Employee Directory - Email Icon.jpg

  

Hi @Oeskandarian ,

 

 

Launch("msteams://teams.microsoft.com/l/chat/0/0?users=" & First(EmployeeProfile).Mail)

 

For more details: Generating a deep link to a chat 

 

Sik

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,534)