Forum Discussion
Getting "BadSyntax:Invalid user identity in provided tenant " from botframework rest api
I have implemented an echo bot which works perfectly fine. Now I am trying to post message from outside bot using REST API. I am getting access token with from https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token using same APP_ID and APP_PASSWORD which is used in bot. I am trying to send message to teams member using below REST request. Member id is obtained from activity which is received by bot when user sends a message. I am getting "Invalid user identity in provided tenant" message with code as BadSyntax. I am sure that I am using same credentials for rest api request and bot.
Method: POST
ServiceURL: https://smba.trafficmanager.net/in/v3/conversations
Header : Authorization Bearer toke
Request Body:
{
"from": {
"id": "28:cc8a42d3-cd41-4589-80cf-3013e4f4ed7f",
"name": "testbot_poc1"
},
"isGroup": false,
"members": [
{
"id": "29:188LCAvBilG1vE0Y0qw11JnGVrwLjMn34yg3QC9jHEX0Uodf0jv4ru9M7GVnfrrRzxVvTv78w_ynTBsFY3qKr6w"
}
],
"channelData": {
"tenant": {
"id": "76213e40-de26-4fad-9141-2d2dd5c0203a"
},
"activity": {
"text": "Hello, world!",
"type": "message"
}
}
}
Tool I am using for authentication was caching my old bot credentials. After changing rest client, this issue got resolved.
- SujayBawaskarCopper Contributor
Tool I am using for authentication was caching my old bot credentials. After changing rest client, this issue got resolved.