I'm having trouble getting an access token when calling microsoft graph through the custom connector builder. I can successfully connect using postman, but not the connector builder unless I input the token and code directly into the authentication script.
Trying the following config:
//This logging is here for testing! Remove before publishing your connector
DOMO.log('accesstoken: ' + metadata.account.accesstoken);
DOMO.log('code: ' + metadata.account.code);
if (metadata.account.accesstoken) {
auth.authenticationSuccess();
}
else {
auth.authenticationFailed('Authentication has failed.');
}
OAuth 2.0
Client Key: made in azure
Client Secret: made in azure
Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Additional Authorization Parameters (Optional): response_type=code
Acess Token URL: https://login.microsoftonline.com/common/oauth2/v2.0/token
Access Token Request Method: POST
Additional Acess Token Parameters (Optional): response_mode=query
Scope: openid%20https://graph.microsoft.com/user.read.all
I have the redirect url put into azure: https://api.domo.com/builder/oauth.html
When I click "get access token" and then "run script", it comes back with "access token: undefined", but gives me a code. I'm thinking there is something wrong with my "additional authorization parameters" or "additional access token parameters", but I'm not sure. Any help would be greatly appreciated as I'm very new to making API calls.