Where to find messages reported by users in Microsoft Team. ChatMessagePolicyViolationPolicyTip C#

Amit Singh Rawat 731 Reputation points
2024-07-01T10:35:06.8166667+00:00

Hi,

With the help of "ChatMessagePolicyViolationPolicyTip" class I block the messages of a particular user. Now this user reported this message to admin.

Now in Microsoft team's admin center, where can I find and approve this message?

I used below C# code to block chat message:

 ChatMessage updatedMessage = new ChatMessage();
 updatedMessage.PolicyViolation = new ChatMessagePolicyViolation()
 {
     PolicyTip = new ChatMessagePolicyViolationPolicyTip()
     {
         GeneralText = "Custom Text to block message",
         MatchedConditionDescriptions = new List<string>() { "Credit Card Number" }
     },
     DlpAction = ChatMessagePolicyViolationDlpActionTypes.BlockAccess,
     VerdictDetails = ChatMessagePolicyViolationVerdictDetailsTypes.AllowFalsePositiveOverride
 };
 var result1 = graphClient.Chats[chatId].Messages[messageId].PatchAsync(updatedMessage).Result;
Microsoft Teams | Development
Microsoft Teams | Microsoft Teams for business | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Amit Singh Rawat 731 Reputation points
    2024-08-13T08:11:42.7566667+00:00

    We can retrieve manually reported messages in the Defender portal with Global Administrator roles and a "Microsoft Defender for Office 365 Plan 2" license.

    However, when I apply "Policy Violation" via code and choose the option to report and send from Microsoft Teams, I still do not receive alerts. This thread is already very confusion, hence closing this thread here. Those who are not receiving alerts while manually reporting messages via Team, please use the required license and role.

    Will create separate thread for policy violation stuff.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.