Forum Discussion
Generate Team/Channel link via API
- Jul 06, 2020
Hi DMarcolo ,
So in terms of getting the Channel link for a Channel of a Team:
GET /teams/{TeamId}GET /teams/{TeamId}/channels
And to specify a link that will take you within a Channel of a Team an example is shown here:
https://teams.microsoft.com/l/team/{ChannelId}/conversations?tenantId={TenantId}"webUrl":https://teams.microsoft.com/_#/conversations/General?threadId=19:b91a8b7e7b1046e78b21c4d405eb3003@thread.tacv2&ctx=channel
Reference Documentation:
https://docs.microsoft.com/en-us/graph/api/team-get?view=graph-rest-1.0&tabs=httphttps://docs.microsoft.com/en-us/graph/api/channel-list?view=graph-rest-1.0&tabs=httpAnd have a play at: https://aka.ms/geThanks
Henry
Hi DMarcolo ,
So in terms of getting the Channel link for a Channel of a Team:
GET /teams/{TeamId}
GET /teams/{TeamId}/channels
And to specify a link that will take you within a Channel of a Team an example is shown here:
https://teams.microsoft.com/l/team/{ChannelId}/conversations?tenantId={TenantId}
https://teams.microsoft.com/_#/conversations/General?threadId=19:b91a8b7e7b1046e78b21c4d405eb3003@thread.tacv2&ctx=channel
https://docs.microsoft.com/en-us/graph/api/team-get?view=graph-rest-1.0&tabs=http
Thanks
Henry
Thanks HenryPhillipsNimbitech ,
now I see/have the team link and channel link correctly!
What about "pre-authenticated" link ?
Is there a way to generate a pre-authenticated link that overtake the SignIn process?
Like: I want to generate, via API, a link for a specific user that point to a specific team/team channel. Clicking on this link user will be auto LoggedIn to the given Team. I know that API is mainly meant to process things "backend" and is not a standard flow, but this might be an expected process. Since I'm able to act on behalf of a user I should be able to give him a fast way to directly log in into Teams without doing a LogIn every time ( eventually with a limited time frame to do this "auto login" ).
Does the API have something to achieve this ?
- HenryPhillipsNimbitechJul 07, 2020Bronze Contributor
Hi DMarcolo ,
The best I can do is refer you to:https://docs.microsoft.com/en-gb/graph/auth/?context=graph%2Fapi%2F1.0&view=graph-rest-1.0You could also try reaching out to one of the Microsoft Graph team by way of Twitter too.
Thanks
Henry
- DMarcoloJul 07, 2020Copper Contributor
Thanks again HenryPhillipsNimbitech ,
unfortunately there's nothing about "authenticated deep link" on API endpoints that: authenticates a user with a simple link/url auto-generated by API. I know I can set up SSO and similar, but still this solutions won't allows me to create a ref/url like this using the API :
https://teams.microsoft.com/l/team/<team>/conversations?groupId=<group>&tenantId=<tenant>&<SPECIAL_TOKEN>=<VALUE>that is capable to authenticate the user who clicks it and directly LogIn into Teams ( using webapp or app). User still need to do the authentication himself