question

Deeptha-2078 avatar image
0 Votes"
Deeptha-2078 asked saldana-msft edited

Regarding Rate Limit for Graph API

Hey,
I would like to know the rate limit per app per tenant and per app across all the tenants for these API's:

  1. /groups?$select=id,resourceProvisioningOptions : listing all the teams in the tenant

  2. https://graph.microsoft.com/v1.0/teams/${teamId}/channels : listing all the channels in the particular team

  3. /v3/conversations/{conversationId}/pagedmembers?pageSize={pageSize} : listing members of particular channel

  4. https://graph.microsoft.com/v1.0/teams/${teamId}/channels/${channelId} : to get channel Details using Channel ID

  5. https://graph.microsoft.com/v1.0/users/{id | userPrincipalName} : to get member details using Id

  6. /v3/conversations/<conversationId/channelId>/activities/<activityId>/ : Sending message to a particular Channel







microsoft-graph-usersmicrosoft-graph-groupsmicrosoft-graph-throttling
· 3
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.

Yes, And When I try to send a message in DM using chat API "https://graph.microsoft.com/v1.0/chats/chat-id/messages", I am getting this error Requested API is not supported in application-only context. But I have the required permissions "ChatMessage.Send, Chat.ReadWrite". What could be the issue here?

0 Votes 0 ·

Hi @Deeptha-2078 Please refer to the answer I posted.

0 Votes 0 ·
CarlZhao-MSFT avatar image
0 Votes"
CarlZhao-MSFT answered CarlZhao-MSFT edited

Hi @Deeptha-2078

Regarding Rate Limit for Graph API

Please refer this documentation to know about Microsoft Teams Service API rate limits.

I am getting this error Requested API is not supported in application-only context. But I have the required permissions "ChatMessage.Send, Chat.ReadWrite". What could be the issue here?

As your error message says, send messages does not support application-only context for the time being, it currently only supports user context.

197135-2022-04-28-103113.png

So you need to grant ChatMessage.Send delegation permission for your application, and then you need to use the auth code flow with user participation to get the access token, and then you will be able to use the user token to call the /chats/chat-id/messages api endpoint to send messages.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




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.

Deeptha-2078 avatar image
0 Votes"
Deeptha-2078 answered CarlZhao-MSFT commented

I gave ChatMessage.Send delegation permission for my application and did the auth flow to get the accesstoken. But still I am getting the same error from the API

· 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.

@Deeptha-2078 Use https://jwt.ms/ to parse your access token and share screenshots.

0 Votes 0 ·
Deeptha-2078 avatar image
0 Votes"
Deeptha-2078 answered Deeptha-2078 commented

I did, I could not see "ChatMessage.Send" permission in the parsed access token. But I have given the permission and granted the admin consent.

· 24
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.

Are you using the auth code flow to get the token?

0 Votes 0 ·

yes, I am using the Auth Flow

0 Votes 0 ·

You should grant delegate permissions and then use the auth code flow to get the token.

0 Votes 0 ·

Are you using an application that has already been granted delegated permissions? Please check.

0 Votes 0 ·

No, it has only application permission

0 Votes 0 ·

You need to grant delegated permissions.

0 Votes 0 ·

Hi @Deeptha-2078 Has the problem been solved?

0 Votes 0 ·
Show more comments