SOLVED

getting and monitoring all channel chat messages of Tenant by using Graph API

%3CLINGO-SUB%20id%3D%22lingo-sub-1614935%22%20slang%3D%22en-US%22%3Egetting%20and%20monitoring%20all%20channel%20chat%20messages%20of%20Tenant%20by%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1614935%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20are%20doing%20a%20project%20to%20use%20Graph%20API%20to%20get%20as%20much%20as%20possible%20information%20to%20monitor%20all%20users%20actions%20in%20Tenant.%26nbsp%3B%3C%2FP%3E%3CP%3ECurrently%2C%20looking%20for%20a%20method%20to%20get%20all%20channel%20message%2C%20referring%20to%20below%20Doc%2C%3C%2FP%3E%3CP%3E%3CFONT%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchannel-list-messages%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchannel-list-messages%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3Eand%20we%20have%20applied%20and%20granted%20the%20permission%20for%20the%20API.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3EBut%2C%20I%20found%20the%20API%20just%20fetch%20all%20history%20messages%2C%20it%20doesn't%20support%20filters%2C%20so%20it%20is%20not%20possible%20fetch%20all%20messages%20daily%2C%20like%20we%20did%20for%20other%20information%20fetching.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20simply%20way%20for%20it%3F%26nbsp%3B%20like%20fetch%20data%20by%26nbsp%3B%20%22startDateTime%3Dxxxxxx%2C%20EndDateTime%3Dxxxxxxx%22%3C%2FP%3E%3CP%3E%3CFONT%3E%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1614935%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-1619995%22%20slang%3D%22en-US%22%3ERe%3A%20getting%20and%20monitoring%20all%20channel%20chat%20messages%20of%20Tenant%20by%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1619995%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F721752%22%20target%3D%22_blank%22%3E%40Eric_Chen%3C%2FA%3E%26nbsp%3B%20I'm%20going%20to%20ask%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F169605%22%20target%3D%22_blank%22%3E%40Christopher%20Hoard%3C%2FA%3E%26nbsp%3Bto%20take%20a%20look%20at%20your%20question.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1620064%22%20slang%3D%22en-US%22%3ERe%3A%20getting%20and%20monitoring%20all%20channel%20chat%20messages%20of%20Tenant%20by%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1620064%22%20slang%3D%22en-US%22%3ESee%20here%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchatmessage-delta%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchatmessage-delta%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAdam%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1621464%22%20slang%3D%22en-US%22%3ERe%3A%20getting%20and%20monitoring%20all%20channel%20chat%20messages%20of%20Tenant%20by%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1621464%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F721752%22%20target%3D%22_blank%22%3E%40Eric_Chen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Eric%20Chen%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20list%20the%20private%20channels'%20chat%20messages%3F%20I%20am%20doing%20it%20now%2C%20but%20I%20can%20not%20read%20the%20private%20channels'%20messages%20if%20I%20am%20not%20in%20the%20private%20channel.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1621481%22%20slang%3D%22en-US%22%3ERe%3A%20getting%20and%20monitoring%20all%20channel%20chat%20messages%20of%20Tenant%20by%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1621481%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F721752%22%20target%3D%22_blank%22%3E%40Eric_Chen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20i%20ask%20what%20is%20the%20business%20need%20for%20monitoring%20all%20activities%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

We are doing a project to use Graph API to get as much as possible information to monitor all users actions in Tenant. 

Currently, looking for a method to get all channel message, referring to below Doc,

https://docs.microsoft.com/en-us/graph/api/channel-list-messages?view=graph-rest-beta&tabs=http

and we have applied and granted the permission for the API.

 

But, I found the API just fetch all history messages, it doesn't support filters, so it is not possible fetch all messages daily, like we did for other information fetching.

 

Is there any simply way for it?  like fetch data by  "startDateTime=xxxxxx, EndDateTime=xxxxxxx"

 

3 Replies
Highlighted
Highlighted

@Eric_Chen 

Hi Eric Chen,

 

Can you list the private channels' chat messages? I am doing it now, but I can not read the private channels' messages if I am not in the private channel.

Highlighted

@Eric_Chen 

 

Can i ask what is the business need for monitoring all activities?