Posting to sideloaded Bot conversation is failing with "Authorization has been denied for this request."

Michael Karampalas 5 Reputation points
2024-05-06T21:47:05.6266667+00:00

Hi there,

I'm developing a new Bot for notifications only. I'm testing with a "development" version that is not published. The App is sideloaded in an account set up for testing with tenant_id: 986e26d3-45ef-4b9c-ba72-b75890332cd3

This call works with a our old Bot Service that is published using the same App Registration.

The authorization is using a Bot token for Bot id: 1006e5b7-59de-44d3-bc63-3025c9165058.

PATH: https://smba.trafficmanager.net/teams/v3/conversations/19:291aa8b6-068a-4b06-86dc-f33baf9fc324_7917afd4-9825-4c1d-b683-ce1fcb77d5b4@unq.gbl.spaces/activities

REQUEST BODY: 
{
  :type=>"message",
  :from=>{
    :id=>"1006e5b7-59de-44d3-bc63-3025c9165058"
  },
  :conversation=>{
    :id=>"19:291aa8b6-068a-4b06-86dc-f33baf9fc324_7917afd4-9825-4c1d-b683-ce1fcb77d5b4@unq.gbl.spaces"
  },
  :recipient=>{
    :id=>"291aa8b6-068a-4b06-86dc-f33baf9fc324",
    :name=>"Microsoft Teams"
  },
  :attachments=>[
    {
      :contentType=>"application/vnd.microsoft.card.adaptive",
      :content=>{
        :$schema=>"http://adaptivecards.io/schemas/adaptive-card.json",
        :type=>"AdaptiveCard",
        :version=>"1.0",
        :text=>"Preview text",
        :body=>[
          {
            :type=>"Container",
            :items=>[
              {
                :type=>"TextBlock",
                :text=>"Heya Microsoft 👋",
                :wrap=>true
              }
            ]
          }
        ]
      }
    }
  ]
}

RESPONSE BODY: {"message"=>"Authorization has been denied for this request."}
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,906 questions
{count} votes