question

PaulWright-0721 avatar image
0 Votes"
PaulWright-0721 asked 35247258 edited

Issue with running GET command within Graph Explorer

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: https://graph.microsoft.com/beta/users/Zolla@zolla75.onmicrosoft.com/chats/getAllMessages

     "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 https://graph.microsoft.com/beta/teams/9708524d-c201-4eeb-854e-502637eef170/channels/19%3a-7Nu-mc2pLJ1l__mRaqtR8proR48zHm6OXOt0CDDydI1%40thread.tacv2/messages - this returns the correct info so I therefore believe my app permissions are configured correctly within AAD. I double checked the permission.

125685-image.png

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

Thanks


microsoft-graph-teamwork
image.png (82.1 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Same issue here.

0 Votes 0 ·
Jake-5344 avatar image
0 Votes"
Jake-5344 answered PaulWright-9595 commented

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









· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

158602-image.png



Hi,

When I do a search for the Chat.Read.All permission within graph explorer, nothing displays. Any ideas as to why?

Thanks

0 Votes 0 ·
image.png (23.8 KiB)
PaulWright-0721 avatar image
0 Votes"
PaulWright-0721 answered Jake-5344 commented

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.

Cheers

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

no problem the link to the form is here it can take a couple of days as they only approve the requests weekly.


1 Vote 1 ·
PaulWright-9595 avatar image
0 Votes"
PaulWright-9595 answered

Hi,

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



Any ideas as to why this doesn't display?


image.png (17.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.