Home

Get Link to Team - Create Link/URL with Group ID

%3CLINGO-SUB%20id%3D%22lingo-sub-168589%22%20slang%3D%22en-US%22%3EGet%20Link%20to%20Team%20-%20Create%20Link%2FURL%20with%20Group%20ID%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-168589%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20designed%20a%20solution%20that%20creates%20teams%20and%20add%20users%20programmatically%20(C%23)%20using%20automation%20namespace%20classes%20and%20commands%20from%20%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fpackages%2FMicrosoftTeams%2F0.9.0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMicrosoftTeams%20PowerShell%26nbsp%3BModule%3C%2FA%3E.%20We%20are%20storing%20GroupID%20returned%20after%20successfully%20creating%20the%20Team.%20%26nbsp%3BUsing%20this%20groupID%20we%20have%20formed%20a%20URL%2FLink%20as%20below%20to%20navigate%20to%20Teams%20in%20browser.%20Link%20created%20in%20following%20format%20was%20working%20fine%20when%20we%20tested%20few%20days%20ago%20however%20this%20URL%20format%20seems%20to%20have%20been%20updated%20and%20now%20redirects%20users%20to%20'Last%20visited%20Team%20Channel'%20instead%20specific%20Team%20(corresponding%20GroupID)%20in%20the%20URL%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fteams.microsoft.com%2F_%3FtenantId%3D%253cTenant%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fteams.microsoft.com%2F_%3FtenantId%3D%3CTENANT%3E%3C%2FTENANT%3E%3C%2FA%3E%20ID%26gt%3B%26amp%3BgroupId%3D%3CGROUP%20id%3D%22%22%3E%3C%2FGROUP%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20someone%26nbsp%3Bguide%20us%20as%20to%20how%20to%20create%20a%20URL%20(Link%20to%20Team)%20which%20will%20redirect%20user%20to%20a%20specific%20Team%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20in%20advance%3C%2FP%3E%0A%3CP%3EVijay%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-168589%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETips%20%26amp%3B%20Tricks%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-292995%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Link%20to%20Team%20-%20Create%20Link%2FURL%20with%20Group%20ID%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-292995%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F163800%22%20target%3D%22_blank%22%3E%40Carsten%20Juretzka%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20so%20much%20-%20that%20makes%20sense.%3C%2FP%3E%3CP%3EA%20small%20part%20of%20New%20Zealand%20is%20better%20off%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDorje%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-292574%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Link%20to%20Team%20-%20Create%20Link%2FURL%20with%20Group%20ID%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-292574%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3CBR%20%2F%3Esince%20we%20had%20trouble%20getting%20the%20data%20we%20needed%20via%20the%20GraphAPI%2C%20we%20used%20for%20a%20POC%20a%20workaround%20involving%20the%20MS-Teams%20PS-Cmdlet.%3C%2FP%3E%3CP%3EWe%20bundled%20the%20connections%20and%20functions%20we%20needed%20and%20executed%20them%20from%20our%20.NET%20solution.%3C%2FP%3E%3CP%3EUsing%20%22Get-TeamChannel%20-GroupId%20%24GroupId%22%20in%20PS%20we%20did%20get%20the%20Channel-ID%2C%20which%20we%20could%20use%20in%20a%20url%20in%20the%20form%3A%3C%2FP%3E%3CP%3Evar%20encodedChannelId%20%3D%20Uri.EscapeDataString(channelId)%3B%3CBR%20%2F%3Evar%20link%20%3D%20%40%22%3CA%20href%3D%22https%3A%2F%2Fteams.microsoft.com%2Fl%2Fteam%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fteams.microsoft.com%2Fl%2Fteam%2F%3C%2FA%3E%22%20%2B%20encodedChannelId%20%2B%20%22%2Fconversations%3FgroupId%3D%22%20%2B%20groupId%20%2B%20%22%26amp%3BtenantId%3D%22%20%2B%20tennantId%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20helps.%20I%20am%20no%20longer%20involved%20in%20the%20project%2C%20so%20I%20am%20not%20sure%2C%20where%20they%20went%20from%20there.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-290980%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Link%20to%20Team%20-%20Create%20Link%2FURL%20with%20Group%20ID%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-290980%22%20slang%3D%22en-US%22%3E%3CP%3EI%20got%20part%20of%20the%20way%20there.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EencodedChannelId%20%3F%20could%20you%20give%20an%20example%20please%20%3F%20I%20still%20don't%20have%20a%20way%20to%20get%20this%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EgroupID%20%3F%20In%20Azure%20%2C%20look%20up%20the%26nbsp%3Bitem%20and%20then%20look%20at%20the%20properties.%20Copy%20the%26nbsp%3BobjectID%3C%2FP%3E%3CP%3EtennantID%20%3F%26nbsp%3BGet%20this%20from%20another%20team.%20Click%20the%20...%20to%20the%20right%20of%20an%20TEAM%20name%20(not%20the%20channel%20name)%20you%20have%20access%20to%2C%20select%20the%20copy%20link%20to%20team%20option.%20Paste%20that%20into%20Notepad%20and%20you'll%20get%20your%20tennantID%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20following%20works%20to%20get%20you%20to%20a%20Group%20Modal%20window%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fteams.microsoft.com%2Fl%2Fteam%2Fconversations%2FGeneral%3FgroupId%3D%26lt%3Bfrom%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fteams.microsoft.com%2Fl%2Fteam%2Fconversations%2FGeneral%3FgroupId%3D%3CFROM%3E%3C%2FFROM%3E%3C%2FA%3E%20Azure%20Group%20Properties%26gt%3B%26amp%3BtenantId%3D%3CFROM%20an%3D%22%22%20existing%3D%22%22%20team%3D%22%22%20link%3D%22%22%3E%3C%2FFROM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20my%20case%20this%20opened%20a%20Modal%20window%20(when%20opened%20in%20the%20browser)%20showing%20the%20details%20about%20the%20Office365%20Group%20I%20was%20interested%20in.%20The%20only%20button%20was%20%22Joined%22%2C%20because%20the%20user%20I%20was%20logged%20in%20as%20is%20already%20a%20member%20of%20the%20group.%3CBR%20%2F%3EOn%20clicking%20%22Joined%22%20nothing%20happened.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EAdding%20and%20removing%20my%20account%20from%20the%20members%20of%20the%20Office365%20group%20got%20me%20an%20email%2C%20from%20which%20I%20found%20out%20that%20the%20Office365%20group%20had%20been%20created%20from%20Outlook%20(not%20Teams)%20and%20that%20was%20why%20it%20failed%20using%20a%20Teams%20URL.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F163800%22%20target%3D%22_blank%22%3E%40Carsten%20Juretzka%3C%2FA%3E%26nbsp%3BI'm%20still%20interested%20in%20how%20you%20got%20the%20ChannelID%20if%20you%20can%26nbsp%3Blet%20me%20know.%3CBR%20%2F%3E%3CBR%20%2F%3EMany%20thanks%3C%2FP%3E%3CP%3ED%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-290979%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Link%20to%20Team%20-%20Create%20Link%2FURL%20with%20Group%20ID%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-290979%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F163800%22%20target%3D%22_blank%22%3E%40Carsten%20Juretzka%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecould%20you%20give%20a%20little%20more%20detail%20please%20%3F%3C%2FP%3E%3CP%3EI'm%20trying%20to%20do%20the%20same%20thing%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EencodedChannelId%20%3F%20could%20you%20give%20an%20example%20please%20%3F%3C%2FP%3E%3CP%3EgroupID%20%3F%20I%20can%20get%20from%20Azure%20objectID%20I%20assume%3C%2FP%3E%3CP%3EtennantID%20%3F%20Where%20can%20I%20get%20this%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-214821%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Link%20to%20Team%20-%20Create%20Link%2FURL%20with%20Group%20ID%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-214821%22%20slang%3D%22en-US%22%3ESolved%20it%20in%20the%20evening%20myself.%3CBR%20%2F%3ECurrently%3CBR%20%2F%3E%22%3CA%20href%3D%22https%3A%2F%2Fteams.microsoft.com%2Fl%2Fteam%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fteams.microsoft.com%2Fl%2Fteam%2F%3C%2FA%3E%22%20%2B%20encodedChannelId%20%2B%20%22%2Fconversations%3FgroupId%3D%22%20%2B%20groupId%20%2B%20%22%26amp%3BtenantId%3D%22%20%2B%20tennantId%3B%3CBR%20%2F%3Eworks%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-214424%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Link%20to%20Team%20-%20Create%20Link%2FURL%20with%20Group%20ID%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-214424%22%20slang%3D%22en-US%22%3EAnything%20new%20on%20this%3F%3CBR%20%2F%3ETeams%20itself%20has%20a%20working%20link%2C%20but%20I%20don't%20find%20a%20documentation%20on%20how%20to%20create%20this%20link%20and%20a%20part%20of%20it%20isn't%20obvious%20to%20me.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-168975%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Link%20to%20Team%20-%20Create%20Link%2FURL%20with%20Group%20ID%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-168975%22%20slang%3D%22en-US%22%3EThanks%20for%20the%20inputs%20Juan%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-168888%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20Link%20to%20Team%20-%20Create%20Link%2FURL%20with%20Group%20ID%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-168888%22%20slang%3D%22en-US%22%3EWell%2C%20this%20is%20a%20problem%20that%20others%20has%20suffered%20and%20as%20far%20as%20I%20know%2C%20we%20don't%20currently%20have%20a%20guidance%20about%20how%20to%20build%20and%20deal%20with%20Teams%20URLs%3C%2FLINGO-BODY%3E
Vijay Nikam
New Contributor

We have designed a solution that creates teams and add users programmatically (C#) using automation namespace classes and commands from MicrosoftTeams PowerShell Module. We are storing GroupID returned after successfully creating the Team.  Using this groupID we have formed a URL/Link as below to navigate to Teams in browser. Link created in following format was working fine when we tested few days ago however this URL format seems to have been updated and now redirects users to 'Last visited Team Channel' instead specific Team (corresponding GroupID) in the URL

 

https://teams.microsoft.com/_?tenantId=<Tenant ID>&groupId=<Group ID>

 

Can someone guide us as to how to create a URL (Link to Team) which will redirect user to a specific Team?

 

Thanks in advance

Vijay

8 Replies
Well, this is a problem that others has suffered and as far as I know, we don't currently have a guidance about how to build and deal with Teams URLs
Thanks for the inputs Juan
Anything new on this?
Teams itself has a working link, but I don't find a documentation on how to create this link and a part of it isn't obvious to me.
Solved it in the evening myself.
Currently
"https://teams.microsoft.com/l/team/" + encodedChannelId + "/conversations?groupId=" + groupId + "&tenantId=" + tennantId;
works

Hi @Carsten Juretzka,

 

could you give a little more detail please ?

I'm trying to do the same thing 

 

encodedChannelId ? could you give an example please ?

groupID ? I can get from Azure objectID I assume

tennantID ? Where can I get this ?

I got part of the way there.

 

encodedChannelId ? could you give an example please ? I still don't have a way to get this

 

groupID ? In Azure , look up the item and then look at the properties. Copy the objectID

tennantID ? Get this from another team. Click the ... to the right of an TEAM name (not the channel name) you have access to, select the copy link to team option. Paste that into Notepad and you'll get your tennantID

 

The following works to get you to a Group Modal window
https://teams.microsoft.com/l/team/conversations/General?groupId=<from Azure Group Properties>&tenantId=<from an existing team link>

 

In my case this opened a Modal window (when opened in the browser) showing the details about the Office365 Group I was interested in. The only button was "Joined", because the user I was logged in as is already a member of the group.
On clicking "Joined" nothing happened.

Adding and removing my account from the members of the Office365 group got me an email, from which I found out that the Office365 group had been created from Outlook (not Teams) and that was why it failed using a Teams URL.

@Carsten Juretzka I'm still interested in how you got the ChannelID if you can let me know.

Many thanks

D

Hi,
since we had trouble getting the data we needed via the GraphAPI, we used for a POC a workaround involving the MS-Teams PS-Cmdlet.

We bundled the connections and functions we needed and executed them from our .NET solution.

Using "Get-TeamChannel -GroupId $GroupId" in PS we did get the Channel-ID, which we could use in a url in the form:

var encodedChannelId = Uri.EscapeDataString(channelId);
var link = @"https://teams.microsoft.com/l/team/" + encodedChannelId + "/conversations?groupId=" + groupId + "&tenantId=" + tennantId;

 

Hope this helps. I am no longer involved in the project, so I am not sure, where they went from there.

Hi @Carsten Juretzka,

 

Thanks so much - that makes sense.

A small part of New Zealand is better off :)

 

Dorje

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies