Home

block a message in Microsoft Teams

%3CLINGO-SUB%20id%3D%22lingo-sub-961372%22%20slang%3D%22en-US%22%3Eblock%20a%20message%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-961372%22%20slang%3D%22en-US%22%3E%20%26nbsp%3B%3CP%3ENow%20we%20plan%20to%20develop%20a%20data%20protection%20App%20for%20Microsoft%20Teams.%20One%20feature%20is%20block%20a%20message%20when%20the%20message%20includes%20someone%20keyword.%3C%2FP%3E%3CP%3ENow%20we%20can%20use%20delegated%20permission%20and%20Teams%20itself%20http%20API(%3CA%20href%3D%22https%3A%2F%2Fapac.msgapi.teams.microsoft.com%2Fv1%2Fusers%2FME%2Fconversations%2F%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fapac.msgapi.teams.microsoft.com%2Fv1%2Fusers%2FME%2Fconversations%2F******%3C%2FA%3E%2Fmessages%2F******%3Fbehavior%3DsoftDelete)%20to%20delete%20the%20message%2C%20but%20it%20not%20friendly%20to%20Teams%20Users%2C%20We%20try%20found%20a%20better%20method%20to%20implement%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20found%20nothing%20but%20some%20similar%20production%20like%20Mcafee%20and%20Smarsh%20released%20on%20%3CA%20href%3D%22https%3A%2F%2Fproducts.office.com%2Fen-us%2Fmicrosoft-teams%2Fapps-integration-and-services%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EMS%20Office%20website%3C%2FA%3E%20they%20have%20implemented%20block-message%20function%2C%20like%20below%20picture%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fi.stack.imgur.com%2FkPgP8.png%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3E%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20asked%20the%20same%20question%20on%20SOF%3A%20%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F58602003%2Fhow-to-block-a-message-in-microsoft-teams.Could%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F58602003%2Fhow-to-block-a-message-in-microsoft-teams.%3C%2FA%3E%20Could%20someone%20tell%20us%20how%20to%20implement%20the%20function%2C%20Thanks%20very%20much.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnother%2C%20we%20do%20remove%20a%20chat%20participant%20by%20the%20same%20way.%20Is%20there%20any%20track%20to%20remove%20a%20chat%20participant%20directly%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-961372%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMeetings%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-961395%22%20slang%3D%22en-US%22%3ERe%3A%20block%20a%20message%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-961395%22%20slang%3D%22en-US%22%3EJust%20a%20FYI%2C%20you%20know%20this%20feature%20does%20exist%20with%20DLP%20for%20teams%3F%3CBR%20%2F%3E%3CBR%20%2F%3ECheers%20%2F%20adam%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-964825%22%20slang%3D%22en-US%22%3ERe%3A%20block%20a%20message%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-964825%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F72542%22%20target%3D%22_blank%22%3E%40adam%20deltinger%3C%2FA%3EThanks%20for%20your%20relay.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20had%20used%20MS%20DLP%20on%20trial%2C%20but%20I%20could%20not%20find%20relative%20APIs%20for%20calling%2C%20because%20we%20plan%20to%20implement%20the%20function%20without%20DLP%2C%20like%20office%20365%20E3%20and%20so%20on.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eit%20is%20said%20that%3C%2FP%3E%3CP%3E%60%60%60%3C%2FP%3E%3CP%3EProtect%20information%20with%20the%20Microsoft%20%3CA%20href%3D%22https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2Fp%2F%3Flinkid%3D2095459%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Enative%20data%20loss%20prevention%20(DLP)%20solution%20for%20Teams%3C%2FA%3E%2C%20options%20from%20%3CA%20href%3D%22https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2Fp%2F%3Flinkid%3D2080849%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESmarsh%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2Fp%2F%3Flinkid%3D2080850%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMcAfee%3C%2FA%3E%2C%20and%20solutions%20you%20can%20build%20and%20integrate%20using%20our%20open%20APIs%20(offered%20soon).%3C%2FP%3E%3CP%3E%60%60%60%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBy%20research%2C%20some%20products%20have%20integrate%20the%20function%2C%20is%20there%20someone%20way%20to%20get%20the%20APIs.%3C%2FP%3E%3CP%3EI'm%20a%20newbie%20programmer%2C%20could%20you%20give%20me%20some%20advises%2C%20thank%20you%20very%20much.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-978692%22%20slang%3D%22en-US%22%3ERe%3A%20block%20a%20message%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-978692%22%20slang%3D%22en-US%22%3E%3CP%3EI%20don't%20have%20an%20answer%20but%20I'd%20love%20to%20know%20how%20these%203rd%20parties%20can%20modify%20an%20existing%20message%2C%20I%20need%20to%20something%20similar%20for%20a%20different%20reason.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1029313%22%20slang%3D%22en-US%22%3ERe%3A%20block%20a%20message%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1029313%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F150%22%20target%3D%22_blank%22%3E%40Hilton%20Giesenow%3C%2FA%3EGraph%20Delegate%20permission%20%2B%20API(%3CA%20href%3D%22https%3A%2F%2Fapac.msgapi.teams.microsoft.com%2Fv1%2Fusers%2FME%2Fconversations%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fapac.msgapi.teams.microsoft.com%2Fv1%2Fusers%2FME%2Fconversations%2F******%3C%2FA%3E%2Fmessages%2F******%3Fbehavior%3DsoftDelete)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1029587%22%20slang%3D%22en-US%22%3ERe%3A%20block%20a%20message%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1029587%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F435238%22%20target%3D%22_blank%22%3E%40NextLabs_Tiger%3C%2FA%3E%26nbsp%3Bsure%20but%20that's%20to%20delete%20-%20I%20want%20to%20know%20how%20to%20-modify-%20a%20message%20after%20it's%20typed%2C%20before%20it%20gets%20posted%2C%20like%20for%20instance%20to%20redact%20a%20word.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1037645%22%20slang%3D%22en-US%22%3ERe%3A%20block%20a%20message%20in%20Microsoft%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1037645%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F150%22%20target%3D%22_blank%22%3E%40Hilton%20Giesenow%3C%2FA%3E%26nbsp%3BI%26nbsp%3Bhas%26nbsp%3Bconsult%26nbsp%3Ba%26nbsp%3BTeams%26nbsp%3BPM%2C%26nbsp%3Bthe%26nbsp%3Boffice%26nbsp%3Binterface%26nbsp%3Bis%26nbsp%3Bdisable%26nbsp%3Bin%26nbsp%3Bhis%26nbsp%3Bdocument.%3C%2FP%3E%3CP%3Eyou%26nbsp%3Bcan%20try%26nbsp%3Band%26nbsp%3Btest%26nbsp%3Bbelow%26nbsp%3Bapi%26nbsp%3Bthat%26nbsp%3BI%26nbsp%3Bnever%26nbsp%3Btest%2C%26nbsp%3Bmaybe%26nbsp%3Bit%26nbsp%3Bcan%26nbsp%3Bwork.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CBLOCKQUOTE%3EPUT%20%22%3CA%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Fapac.ng.msg.teams.microsoft.com%2Fv1%2F%3C%2FA%3E%3C%2FBLOCKQUOTE%3E%3CBLOCKQUOTE%3E%3CA%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Eusers%2FME%2Fconversations%2F%7Bconversation_id%7D%40unq.gbl.spaces%2Fmessages%2F%7Bmessage_id%7D%3C%2FA%3E%22%3CBR%20%2F%3E%22%7B%22%22content%22%22%3A%22%22your-text%22%22%2C%22%22messagetype%22%22%3A%22%22Text%22%22%2C%22%22contenttype%22%22%3A%22%22text%22%22%2C%22%22amsreferences%22%22%3A%5B%5D%2C%22%22clientmessageid%22%22%3A%22%22the_origin_id%22%22%2C%22%22imdisplayname%22%22%3A%22%22the_origin_name%22%22%2C%22%22properties%22%22%3A%7B%22%22importance%22%22%3A%22%22%22%22%2C%22%22subject%22%22%3Anull%7D%7D%22%3CBR%20%2F%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
NextLabs_Tiger
New Contributor
 

Now we plan to develop a data protection App for Microsoft Teams. One feature is block a message when the message includes someone keyword.

Now we can use delegated permission and Teams itself http API(https://apac.msgapi.teams.microsoft.com/v1/users/ME/conversations/******/messages/******?behavior=softDelete) to delete the message, but it not friendly to Teams Users, We try found a better method to implement it.

 

We found nothing but some similar production like Mcafee and Smarsh released on MS Office website they have implemented block-message function, like below picture:

Tiger_20191029012652.png

 

We asked the same question on SOF: https://stackoverflow.com/questions/58602003/how-to-block-a-message-in-microsoft-teams. Could someone tell us how to implement the function, Thanks very much.

 

Another, we do remove a chat participant by the same way. Is there any track to remove a chat participant directly

6 Replies
Highlighted
Just a FYI, you know this feature does exist with DLP for teams?

Cheers / adam
Highlighted

@adam deltingerThanks for your relay.

 

I had used MS DLP on trial, but I could not find relative APIs for calling, because we plan to implement the function without DLP, like office 365 E3 and so on.

 

it is said that

```

Protect information with the Microsoft native data loss prevention (DLP) solution for Teams, options from Smarsh and McAfee, and solutions you can build and integrate using our open APIs (offered soon).

```

 

By research, some products have integrate the function, is there someone way to get the APIs.

I'm a newbie programmer, could you give me some advises, thank you very much.

Highlighted

I don't have an answer but I'd love to know how these 3rd parties can modify an existing message, I need to something similar for a different reason.

@Hilton GiesenowGraph Delegate permission + API(https://apac.msgapi.teams.microsoft.com/v1/users/ME/conversations/******/messages/******?behavior=softDelete)

Highlighted

@NextLabs_Tiger sure but that's to delete - I want to know how to -modify- a message after it's typed, before it gets posted, like for instance to redact a word. 

Highlighted

@Hilton Giesenow I has consult a Teams PM, the office interface is disable in his document.

you can try and test below api that I never test, maybe it can work.

 

PUT "https://apac.ng.msg.teams.microsoft.com/v1/
users/ME/conversations/{conversation_id}@unq.gbl.spaces/messages/{message_id}"
"{""content"":""your-text"",""messagetype"":""Text"",""contenttype"":""text"",""amsreferences"":[],""clientmessageid"":""the_origin_id"",""imdisplayname"":""the_origin_name"",""properties"":{""importance"":"""",""subject"":null}}"