Forum Discussion

christosjubile's avatar
christosjubile
Brass Contributor
Feb 28, 2021

Microsoft Teams, Fetch ALL chat messages with MS Graph API

I need to fetch all of the users' chats (even private ones) since the Admin had already given us their consent.

How can I do that using Graph API?

We are a bit confused between the Delegated vs. Application Permissions

 

 

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

 

 

 

I am calling the

 

 

/users/< user-id >/chats

 

 

for a user-id different from mine (I am the admin) but it returs that the call is unauthorized

Can the Admin get Delegated Permissions through setting their org-wide policies appropriately?

    • christosjubile's avatar
      christosjubile
      Brass Contributor
      Sorry my dear but the answer it was not sufficient enough but I had to assume it as a possible solution or a possible bug, the question remains: "Is it possible for an admin to permit a third party application to fetch all the users private chat messages?"
      • Mamatha-MSFT's avatar
        Mamatha-MSFT
        Icon for Microsoft rankMicrosoft

        christosjubilefor that API only delegated permissions can be enabled and it doesn't support application permissions. Hence you cannot get other user's chat 

        Microsoft will always focus on customer’s feedback and experience, some new features would be added to the services based on customers' feedback in the future, we also recommend you give your new idea in Teams UserVoice here.

Resources