Home

Microsoft Teams Graph API - list channel messages

%3CLINGO-SUB%20id%3D%22lingo-sub-315304%22%20slang%3D%22en-US%22%3EMicrosoft%20Teams%20Graph%20API%20-%20list%20channel%20messages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-315304%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20having%20trouble%20understanding%20who%20all%20have%20access%20to%20channel%20messages.%20It%20appears%20to%20me%20as%20if%20only%20members%20of%20a%20team%20can%20access%20messages%20of%20channels%20of%20that%20team.%20Is%20that%20true%3F%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20documentation%20states%20Permissions%20that%20the%20Azure%20App%20must%20have%20to%20access%20the%20messages.%20My%20Azure%20App%20has%20the%20required%20permissions.%20I%20am%20using%20global%20administrator%20account%20(not%20member%20of%20the%20team)%20but%20I%20get%20http%20code%20403%20when%20I%20try%20to%20access%20channel%20messages%20as%20documented%20here%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchannel-list-messages%3Fview%3Dgraph-rest-beta%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Egraph-rest-beta%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20somebody%20point%20me%20in%20the%20right%20direction%2C%20please%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-315304%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319943%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20Graph%20API%20-%20list%20channel%20messages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319943%22%20slang%3D%22en-US%22%3E%3CP%3ERight%2C%20an%20admin%20should%20be%20able%20to%20do%20things%20without%20being%20a%20member%20of%20the%20team.%3C%2FP%3E%3CP%3EMeanwhile%2C%20I%20found%20this%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fknown-issues%23graph-explorer-and-global-admins%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Esource%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ECurrently%2C%20Graph%20Explorer%20allows%20global%20admins%20to%20manipulate%20teams%20they%20are%20not%20an%20owner%20or%20member%20of%2C%20but%20other%20apps%20attempting%20to%20make%20the%20same%20API%20calls%20will%20fail%20if%20the%20current%20user%20is%20not%20a%20member%20or%20owner%20of%20the%20team.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%2C%20I%20used%20Graph%20Explorer%20and%20tried%20creating%20a%20new%20channel%20in%20the%20team%20where%20the%20global%20admin%20could%20not%20access%20messages.%20A%20new%20channel%20was%20created%20but%20when%20I%26nbsp%3Btried%20to%20access%20the%20messages%20from%20this%20newly%20created%20channel%2C%20it%20failed%20with%20403.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319628%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20Graph%20API%20-%20list%20channel%20messages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319628%22%20slang%3D%22en-US%22%3EThat%20is%20what%20I%20was%20afraid%20of.%20It%20seems%20that%20there%20should%20be%20way%20to%20get%20those%20conversations%20in%20public%20teams...heck%20from%20an%20admin%20standpoint%20it%20shouldn't%20matter%20if%20it's%20public%20or%20private.%20For%20example%2C%20a%20Yammer%20Admin%20can%20see%20all%20conversations%2C%20and%20can%20export%20everything%20so%20it%20can%20be%20analyzed.%20One%20issue%20that%20we%20are%20looking%20at%20resolving%20is%20how%20does%20a%20Teams%20%22community%20manager%22%20see%20what%20people%20are%20doing%20in%20Teams%20when%20they%20don't%20want%2Fneed%20to%20be%20a%20member%20of%20every%20team%2C%20and%20don't%20have%20access%20to%20private%20teams.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319575%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20Graph%20API%20-%20list%20channel%20messages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319575%22%20slang%3D%22en-US%22%3ENo%20%3Arelieved_face%3A%3C%2Fimg%3E%20the%20private%20%2F%20public%20teams%20relates%20only%20to%20sharepoint%20files%20within%20the%20team%20where%20everyone%20gets%20access%20to%20files%20by%20default%20in%20public%20teams!%20You%20still%20need%20to%20be%20a%20member%20to%20read%20conversations%20etc%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319567%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20Graph%20API%20-%20list%20channel%20messages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319567%22%20slang%3D%22en-US%22%3E%3CP%3EDrat%2C%20I%20was%20hoping%20for%26nbsp%3B%20simple%20solution.%26nbsp%3B%20Sorry.%26nbsp%3B%20I'll%20ask%20around%20and%20see%20if%20I%20find%20anything%20and%20pass%20it%20along%20if%20I%20do.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319263%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20Graph%20API%20-%20list%20channel%20messages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319263%22%20slang%3D%22en-US%22%3EThanks%20David!%20But%20that%20doesn't%20seem%20to%20be%20the%20case.%3CBR%20%2F%3EI%20went%20through%20the%20list%20of%20teams%20and%20their%20respective%20properties.%20I%20have%20a%20team%20which%20is%20Public%2C%20but%20its%20messages%20cannot%20be%20accessed%20by%20the%20global%20administrator.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-315964%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20Graph%20API%20-%20list%20channel%20messages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-315964%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20a%20guess%20here%2C%20but%20if%20the%20Team%20is%20private%2C%20then%20the%20account%20running%20the%20action%20would%20need%20to%20be%20a%20member%20of%20the%20team.%26nbsp%3B%20If%20the%20Team%20is%20public%2C%20then%20the%20account%20should%20be%20able%20to%20see%20the%20messages.%3C%2FP%3E%3C%2FLINGO-BODY%3E
spilani
New Contributor

Hi,

I am having trouble understanding who all have access to channel messages. It appears to me as if only members of a team can access messages of channels of that team. Is that true? 

The documentation states Permissions that the Azure App must have to access the messages. My Azure App has the required permissions. I am using global administrator account (not member of the team) but I get http code 403 when I try to access channel messages as documented here graph-rest-beta

 

Can somebody point me in the right direction, please?

 

Thanks!

 

6 Replies

Just a guess here, but if the Team is private, then the account running the action would need to be a member of the team.  If the Team is public, then the account should be able to see the messages.

Thanks David! But that doesn't seem to be the case.
I went through the list of teams and their respective properties. I have a team which is Public, but its messages cannot be accessed by the global administrator.

Drat, I was hoping for  simple solution.  Sorry.  I'll ask around and see if I find anything and pass it along if I do.

No :relieved_face: the private / public teams relates only to sharepoint files within the team where everyone gets access to files by default in public teams! You still need to be a member to read conversations etc
That is what I was afraid of. It seems that there should be way to get those conversations in public teams...heck from an admin standpoint it shouldn't matter if it's public or private. For example, a Yammer Admin can see all conversations, and can export everything so it can be analyzed. One issue that we are looking at resolving is how does a Teams "community manager" see what people are doing in Teams when they don't want/need to be a member of every team, and don't have access to private teams.

Right, an admin should be able to do things without being a member of the team.

Meanwhile, I found this source

Currently, Graph Explorer allows global admins to manipulate teams they are not an owner or member of, but other apps attempting to make the same API calls will fail if the current user is not a member or owner of the team.

 

So, I used Graph Explorer and tried creating a new channel in the team where the global admin could not access messages. A new channel was created but when I tried to access the messages from this newly created channel, it failed with 403.

 

 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies