OAuth 2.0 authorization Token Using Call Rest

0
Hello all,   I am trying to create an appointment with data from my app in outlook using the microflow shown below. As shown in the related documentation I need three ‘Call Rest’ objects. The first redirects the user to a webpage to get authorization and returns a code in a variable. The second uses this code to retrieve a token from the Microsoft servers and returns this in a variable. The third uses this token in the HTTP header with the correct HTML code containing appointment info.  Currently executing the first part of the microflow does nothing. When I execute the second part of the microflow I start encountering errors. Any help would be greatly appreciated. Info shown below. The first ‘Call Rest’ Object This is the location. It works when entered into a browser window. ”https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=1793b3ef-bbc0-4860-b3e4-88d2db3cc612&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient&response_mode=query&scope=offline_access%20user.read%20mail.read”  This has no HTTP headers or Request.   The second ‘Call Rest’ Object Contains no HTTP headers   The third ‘Call Rest’ Object
asked
1 answers
0

Hi Chris,

Connecting to OAuth can be tricky.

I am not an expert on the field of OAuth, but from reading the docs and experience with saml sso i think you need to separate the first call from the last two calls.

The first call should not be a rest call, but a redirect of the user to the given url. The user then logs in and is redirected back to the redirect_uri, which should be a deeplink in your app.

After the user is redirected back, you can do the two rest calls.

Maybe Mike's answer on this question can guide you a little: https://forum.mendix.com/link/questions/95189

I hope this helps.

answered