Attempt to send message from Postman to Bot API returning Activity of type:'trace' with value:'Error: The clientSecret parameter is required.'

Leo Messi 0 Reputation points

The bot app is based on this sample by Microsoft- . I have attached a screenshot of what happens when you send a message to the bot from the teams meeting chat, i.e. an adaptive card getting posted in the meeting chat when we send the bot the message "sendContentBubble".

I am trying to replicate this sending of message to the bot from teams meeting chat by making a POST api call to the bot's endpoint with the message "sendContentBubble". The endpoint where I tried to send the post request is http://localhost:3978/api/messages since I am running my bot app locally in this port. My request had the bearer token added for authorization and I have attached the screenshot of the json object that was part of the post API call. The JSON payload aims to replicate the payload that gets sent to the api endpoint when the message is sent to the bot from the meeting chat.

The API call is returning me a 200 status code meaning that the API call was successful. However, the issue is when the bot is supposed to respond with an adaptive card in the meeting chat based on the API call that was made to it, no adaptive card gets returned in the meeting chat and if take a closer look at the Activity object that came back from the bot, we can see that there is an error with the description 'Error: The clientSecret parameter is required.'

I have attached the screenshot of the Activity object returned by the bot. The POST API call that I made had a valid bearer token added for which there was no Authorization error. I have attached a screenshot of the headers that were present in the API call as well below. So, where am I being expected to add the clientSecret parameter which would potentially resolve the issue? I tried adding "Client-Secret" in the header and provide the secret from the bot App registration in Azure but I still get "[onTurnError] unhandled error: Error: The clientSecret parameter is required. ".

User's image

User's image

User's image

User's image

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,379 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nivedipa-MSFT 2,626 Reputation points Microsoft Vendor

    @Leo Messi - The error message suggests that the client secret parameter is missing. The client secret is a credential used to authenticate the bot with the Azure AD. To resolve this issue, you need to provide the client secret in the appropriate location.

    In the context of the sample code provided, the client secret is typically stored in the .env file or as an environment variable. You can find the .env file in the sample code repository you mentioned (

    To add the client secret, follow these steps:

    1. Open the .env file in the sample code repository.
    2. Look for the MicrosoftAppId and MicrosoftAppPassword properties.
    3. Replace the value of MicrosoftAppPassword with your client secret.

    Here is an example of how the .env file should look:




    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    0 comments No comments