Issue with running GET command within Graph Explorer

Paul Wright 1 Reputation point

I have been tasked to retrieve bulk chat messages from a particular user within Teams in the chat and channel areas.

I am using Graph Explorer. I am getting an error when running the following query:

    "code": "PreconditionFailed",  
            "message": "Requested API is not supported in delegated context",  

I have setup App permissions within AAD and provided the correct permissions to run the query.

I am able to run other queries like - this returns the correct info so I therefore believe my app permissions are configured correctly within AAD. I double checked the permission.


I am very new to this so any guidance would be appreciated.


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,824 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Jake 6 Reputation points

    The getAllMessages endpoint is a protected API did you request access? export-teams-content

    Prerequisites to access Teams Export APIs

    Teams Export APIs are currently in preview. It will only be available to users and tenants that have the required licenses for APIs. In the future, Microsoft may require you or your customers to pay additional fees based on the amount of data accessed through the API.

    Microsoft Teams APIs in Microsoft Graph that access sensitive data are considered protected APIs. Export APIs require that you have additional validation, beyond permissions and consent, before you can use them. To request access to these protected APIs, complete the request form.

    Application permissions are used by apps that run without a signed-in user present; application permissions can only be consented by an administrator. The following permissions are needed:

    Chat.Read.All: enables access to all 1:1, Group chat, and meeting chat messages
    ChannelMessage.Read.All: enables access to all channel messages
    User.Read.All: enables access to the list of users for a tenant

  2. Paul Wright 1 Reputation point

    Hi there

    Thanks very much for the reply. I haven't requested access so will run through this first. I guess these are in preview too at the moment.

    Will have to check how to request access.


  3. Paul Wright 1 Reputation point


    When I do a search for the Chat.Read.All permission within graph explorer, nothing displays.

    Any ideas as to why this doesn't display?

    0 comments No comments