'MSGraph Chat API - without reading chat body
Our use case demands that we count the number of chat messages a user is receiving in every hour. We don't want to receive or read the body of the chat. This is to ensure that we have a highly trusted and private design to meet privacy and security standards of US/European organizations.
With our research we found two alternatives:
Alternative1:
Get Chat https://docs.microsoft.com/en-us/graph/api/chat-get?view=graph-rest-1.0&tabs=http
This is ideal for our needs, as the info we need is basic and the permission we seek from Admin is Chat.ReadBasic.All
Though this API needs to get chat ID for the users, for which we need to use List Chat API as well
List Chat https://docs.microsoft.com/en-us/graph/api/chat-list?view=graph-rest-1.0&tabs=http
The issue with this API is that it does not allow Application level permission, and we are forced to get User's access token to access delegated access to this API - which is not a good security practice.
Alternative2: ** ** https://docs.microsoft.com/en-us/graph/api/chats-getallmessages?view=graph-rest-1.0&tabs=http
We are able to count the chat messages with the Application level permission without a user level access token. Even though we are receiving the body of the chat messages, we are not reading or saving these.
The issue with this is that we have objections from Teams Admins of US and European companies -- as we do have access to the body of the chat, whether we read or not.
Request your help with a) Suggest an API similar to List Chat API with Application level permission b) Suggest an API similar to GetAllMessages API without the chat message body c) Suggest an alternative we may not have considered
Thanks in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
