126
Views
11
Comments
Solved
Get Access Token from Azure AD
Question

hello,

I used the following link:

https://login.microsoftonline.com/<tenantId>/oauth2/V2.0/token  

to get the Access Token But it didn't work in Service Studio (consuming RestAPI); I will work fine in Postman.

Postman Output: 

Outsystems Service Studion Rest API Output:

2020-09-21 08-42-47
Vincent Koning
Solution

I'm not sure if you want to create a login provider or get an access token to communicate with an API. But in both cases the Microsoft Login Connector has actions that should assist you with this. Give it a try :)

2022-12-05 07-28-20
Nihil Gujar

I just want to fetch the user list from Azure AD to our OutSystems application. For that as well, we have to use this????

2020-09-21 08-42-47
Vincent Koning

You don't have to do anything but that forge component offers an action called "GetApplicationToken". We use this action for the almost the same exact purpose, to call the Microsoft Graph to get a group user member list .

Used API: https://graph.microsoft.com/v1.0/groups?$filter={Filter}

2024-05-08 06-29-37
Prince Aadil Khan Panwar

Hi Nihil Gujar, 

did you check your logs into the service center? 

hope this helps

Thanks

Prince

2022-12-05 07-28-20
Nihil Gujar

Hello,

There is no error while consuming API

My issue is how to fetch the access token.

2024-05-08 06-29-37
Prince Aadil Khan Panwar

you need to create a server action for access token by consuming api for access token  and then pass into the api. this will revert your thing which you want. 

i am trying to tell you in this way. 

2022-12-05 07-28-20
Nihil Gujar

While testing, I Passed the client ID, client secret, and Other Parameters , In response, i didn't Get access token, I already tried with Server action, but Still Its not Showing   


Can you please Show this in Service Studio REST API 

2024-05-08 06-29-37
Prince Aadil Khan Panwar

i see. then try to check your client id and other parameter if its working on post man then it should work for it definitely. just check once.

2024-05-08 06-29-37
Prince Aadil Khan Panwar

oh. please try to read this blog.

https://success.outsystems.com/documentation/11/developing_an_application/secure_the_application/end_users/end_users_authentication/configure_azure_ad_authentication/

 i guess this will help you or PM me the client id and secret id so that i will try at my systems. or try to attach OML

2020-09-21 08-42-47
Vincent Koning
Solution

I'm not sure if you want to create a login provider or get an access token to communicate with an API. But in both cases the Microsoft Login Connector has actions that should assist you with this. Give it a try :)

2022-12-05 07-28-20
Nihil Gujar

I just want to fetch the user list from Azure AD to our OutSystems application. For that as well, we have to use this????

2020-09-21 08-42-47
Vincent Koning

You don't have to do anything but that forge component offers an action called "GetApplicationToken". We use this action for the almost the same exact purpose, to call the Microsoft Graph to get a group user member list .

Used API: https://graph.microsoft.com/v1.0/groups?$filter={Filter}

UserImage.jpg
Alexandre Yip

Hi Nihil Gujar, 

Check out the following links

https://itnext.io/getting-started-with-outsystems-and-microsoft-graph-123006356d41

https://m.youtube.com/watch?v=yVK8WQz5qnU

Hope that it helps you 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.