ruosco82
ruosco82

Reputation: 31

Error Microsoft Graph API. Get Messages for Channel

my program through a Graph API call accesses channel messages. I have a problem. For one Azure application it works but for another it doesn't. The two applications have the same Api authorization. What can it be?

var c = Task.Run(() => graphClient.Teams[teams].Channels[channelId].Messages .Request() .GetAsync());

It's the error:

Code: UnknownError
Inner error:
    AdditionalData:
    date: 2020-08-28T12:15:04
    request-id: 3026d5b8-8178-45f0-97a2-103d5a602b33
ClientRequestId: 3026d5b8-8178-45f0-97a2-103d5a602b33

It's Api authorization

enter image description here

Upvotes: 0

Views: 390

Answers (1)

Allen Wu
Allen Wu

Reputation: 16438

List channel messages is included in Protected APIs in Microsoft Teams.

To request access to these protected APIs, complete the following request form.

The form requires you to enter the "App id(s) to enable application permissions for".

After that the 403 error will be fixed.

Upvotes: 1

Related Questions