[IdP] Get Access Token for Rest API

Forge Component
(34)
Published on 9 May by Telmo Martins
34 votes
Published on 9 May by Telmo Martins

Hi, 

In our Azure AD we have several applications defined that users can access. Some of these are API's that I want to consume with OutSystems. I'm trying to discover if IdP can assist me with getting an access token for these API's or if anyone has some experience with this to give me some pointers.

As far as I know I should get a claim by calling the following URL: https://login.microsoftonline.com/{tenantId}/oauth2/authorize?resource={restEndpoint}

I can then use the claim to get an access token by calling this url https://login.microsoftonline.com/{tenantId}/oauth2/token

I can then use the retrieved bearer token in the header when I call our API. 


Is this already possible with IdP?

Hi Vincent,

IdP component it's for SAML 2.0 protocol.

From what you described you'll need to use oauth2 protocol.

In forge you can also find some components for authentication through oauth2.

Regards.

Aah.. Thank you. I'll take a look at the other possibilities.