Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
It is not working from postman
it is working from graph developer
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
We are trying to send message using graph API with below permission. But we are getting API requires one of 'Teamwork.Migrate.All'. Roles on the request 'User.Read.All, Chat.ReadWrite.All, Chat.Create'. We just want to send the message not the migration activity.
curl --location 'https://graph.microsoft.com/v1.0/chats/19:KkGoXOg2cZbMKOEU562AmZMqEVL9joUu7D2ywE2EJ6U1@thread.tacv2/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxxx' \
--data '{
"body": {
"content": "Hello world"
}
}'
Response:
{
"error": {
"code": "Forbidden",
"message": "Missing role permissions on the request. API requires one of 'Teamwork.Migrate.All'. Roles on the request 'User.Read.All, Chat.ReadWrite.All, Chat.Create'.",
"innerError": {
"date": "2023-07-28T08:19:02",
"request-id": "663b824c-cc65-40d3-90ce-77e3908ccb2f",
"client-request-id": "663b824c-cc65-40d3-90ce-77e3908ccb2f"
}
}
}
Permission:
API / Permissions nameTypeDescriptionAdmin consent requiredStatusMicrosoft Graph (8)ChannelMessage.ReadWriteDelegatedRead and write user channel messagesYesGranted for Deutsche Bank AG DevChannelMessage.SendDelegatedSend channel messagesNoGranted for Deutsche Bank AG DevChat.CreateApplicationCreate chatsYesGranted for Deutsche Bank AG DevChat.ReadWriteDelegatedRead and write user chat messagesNoGranted for Deutsche Bank AG DevChat.ReadWrite.AllApplicationRead and write all chat messagesYesGranted for Deutsche Bank AG DevChatMessage.SendDelegatedSend user chat messagesNoGranted for Deutsche Bank AG DevUser.ReadDelegatedSign in and read user profileNoGranted for Deutsche Bank AG DevUser.Read.AllApplicationRead all users' full profilesYesGranted for Deutsche Bank AG Dev
Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
An API that connects multiple Microsoft services, enabling data access and automation across platforms
It is not working from postman
it is working from graph developer
@Vaibhav-A Mankar-Are you using Application permission or delegated permission? If you are using Application permission, then Application permissions are only supported for migration.
Could you please try with the below Graph API-
POST /teams/{team-id}/channels/{channel-id}/messages
Another user is having the same problem: https://stackoverflow.com/questions/76908272/how-do-i-send-messages-to-the-posts-tab-of-a-channel-in-teams
My remarks there:
The only other options for doing this are ones the page lists as deprecated, which is frustrating:
ChannelMessage.SendandGroup.ReadWrite.Allpermissions. [...] I guess they have marked that permission as deprecated because they plan to charge money for real-time external message feed functionality eventually, but just haven't had time to implement that yet...
Any update on question?