Reputation: 399
Following the article https://blog.botframework.com/2017/06/19/Load-Testing-A-Bot/ to test a bot. Im trying to get an accessToken, but Im getting a 500. The same is happening if I run the Emulator from code. The downloaded emulator works fine.
{
"error": "server_error",
"error_description": "AADSTS70002: Error validating credentials.\r\nTrace ID: 06f655dd-dc88-49ec-a429-1c86fc1a1b00\r\nCorrelation ID: 070d67cc-361f-45ad-a0bb-d07d5d1e73f4\r\nTimestamp: 2017-07-31 00:54:46Z",
"error_codes": [
70002
],
"timestamp": "2017-07-31 00:54:46Z",
"trace_id": "06f655dd-dc88-49ec-a429-1c86fc1a1b00",
"correlation_id": "070d67cc-361f-45ad-a0bb-d07d5d1e73f4"
}
The process to get the access token is to post to https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token with
x-www-form-urlencoded values:
grant_type=client_credentials
client_id= <YOUR MSA APP ID>
client_secret = <YOUR MSA APP SECRET>
scope = <YOUR MSA APP ID>/.default
Note: a locally built version of the Emulator, with a fresh clone, also has the same issue, while the downloaded version connects correctly
Upvotes: 3
Views: 540
Reputation: 399
The latest master on Emulator is breaking the access token request. You need to checkout the commit 4923221 to make it work.
To get the access token directly with a post request: the post url is https://login.microsoftonline.com/common/oauth2/v2.0/token , and the scope is https://graph.microsoft.com/.default The rest should be as specified previously
Upvotes: 2