Search code examples
microsoft-graph-apimicrosoft-teamsmicrosoft-graph-teams

MS Graph API - flag a chat message as policy violation


I see in Microsoft graph permissions reference page (https://learn.microsoft.com/en-us/graph/permissions-reference) that there is a permission for an application to "Flag channel messages for violating policy". I would like to do just that so in my app (flag any teams message received by the webhook, if it violates some condition), but could not find any documentation on how to do so.

How is it possible to flag messages using the graph API RESt endpoint?

Thanks


Solution

  • It looks like this permission has been created for future use but is not yet in use by any API at the time. (I couldn't find any other reference)

    If you search the API metadata for "PolicyViolation" (include the double quotes in the search pattern), you'll find the property (and it's related type) on the chatMessage entity type.

    You could try to update the message (only this property) with the new permission, it's likely that it won't work at the time because this API is not "ready".