SOLVED

Generate Team/Channel link via API

%3CLINGO-SUB%20id%3D%22lingo-sub-1505463%22%20slang%3D%22en-US%22%3EGenerate%20Team%2FChannel%20link%20via%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1505463%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%3C%2FP%3E%3CP%3EI%20would%20like%20some%20help%20with%20the%20Microsoft%20API%20Graph%20-%20Teams%20product.%20I'm%20creating%20a%20new%20app%20in%20my%20Azure%20Directory%20to%20be%20able%20to%20interact%20with%20the%20Teams%20and%20groups%20that%20exists%20within%20this%20directory.%20I%20was%20able%20to%20create%20a%20group%2C%20some%20users%2C%20a%20team%20and%20some%20channels%20via%20API.%20I%20was%20wondering%20if%20there's%20any%20way%20to%20generate%20or%20get%20the%20channel%20link%20from%20any%20team%2Fchannel%20related%20endpoint.%20I%20saw%20that%20from%20the%20%22%3CSPAN%3Eme%2FjoinedTeams%22%20details%20there's%20a%20field%20named%26nbsp%3B%3C%2FSPAN%3E%3CEM%3E%3CSTRONG%3EwebUrl%3C%2FSTRONG%3E%3C%2FEM%3E%2C%20but%20it's%20always%20empty%20for%20any%20teams%20I'm%20in.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnother%20thing%20I%20was%20trying%20to%20achieve%20is%20to%20get%20some%20%22pre-authenticated%22%20link%20for%20a%20specific%20user%2C%20with%20a%20direct%20access%20to%20a%20joined%20team%20or%20a%20team%20in%20general.%20Let%20me%20explain%20this%20%3A%26nbsp%3B%3C%2FP%3E%3CP%3E-%20I'm%20able%20to%20authenticate%20my%20app%20on%20behalf%20of%20a%20user%3C%2FP%3E%3CP%3E-%20I'm%20able%20to%20refresh%20and%20renew%20authentication%20via%20the%20auth%2Frefresh%20token%20for%20a%20given%20user%3C%2FP%3E%3CP%3ENow%20at%20this%20point%2C%20I%20can%20act%20as%20a%20user.%20But%20how%20can%20I%20generate%2Fget%20some%20sort%20of%20deep%20link%20or%20authenticated%20deep%20link%20where%20anyone%20(%20who%20possess%20this%20link%20)%20can%20click%20and%20via%20this%20link%2C%20be%20logged%20as%20given%2Fchosen%20user%20automatically%2C%20causing%20the%20load%2Fopen%20of%20the%20team%20(web%2Fapp)%20directly%20with%20the%20selected%20user%20on%20the%20proper%2Fprovided%20team%20channel%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1505463%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAPI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAuthentication%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Contributor

Hi everyone,

I would like some help with the Microsoft API Graph - Teams product. I'm creating a new app in my Azure Directory to be able to interact with the Teams and groups that exists within this directory. I was able to create a group, some users, a team and some channels via API. I was wondering if there's any way to generate or get the channel link from any team/channel related endpoint. I saw that from the "me/joinedTeams" details there's a field named webUrl, but it's always empty for any teams I'm in. 

 

Another thing I was trying to achieve is to get some "pre-authenticated" link for a specific user, with a direct access to a joined team or a team in general. Let me explain this : 

- I'm able to authenticate my app on behalf of a user

- I'm able to refresh and renew authentication via the auth/refresh token for a given user

Now at this point, I can act as a user. But how can I generate/get some sort of deep link or authenticated deep link where anyone ( who possess this link ) can click and via this link, be logged as given/chosen user automatically, causing the load/open of the team (web/app) directly with the selected user on the proper/provided team channel?

 

Thanks

4 Replies
Highlighted
Best Response confirmed by ThereseSolimeno (Microsoft)
Solution

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:

"webUrl":

https://teams.microsoft.com/_#/conversations/General?threadId={ChannelId}@thread.tacv2@thread.tacv2&...

 
And have a play at: https://aka.ms/ge
 

Thanks

 

Henry

 

 

Highlighted

Thanks @henryarphillips365 , 

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 ?

 

@ThereseSolimeno 

Highlighted

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.0

 

You could also try reaching out to one of the Microsoft Graph team by way of Twitter too.

 

Thanks

 

Henry

Highlighted

Thanks again @henryarphillips365 , 

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_T... 

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