[Microsoft Login Connector Reactive] How to implement this component in Service Studio?
Question
Forge component by Miguel Amado

Could anyone helpfully advise how to implement this component in Service Studio? The documentation on the Forge only seems to deal with the Azure side of things. I've registered the URL and have a Client ID and Client Secret, now what...

I've successfully implemented the MS login Connector for my traditional web apps but constituent parts of the Reactive version are slightly different. 

Many thanks

Richard


Solution

Hi Richard.

For this component to work you need 2 more applications (one should already be installed as it's directly depended on this).

1. Microsoft Login Connector Core

2. Microsoft Login Connector Management

You need the Management application to configure your Azure AD applications and "attach" these to Espaces and Resources. I will post a better documentation soon but in short you need to do the following;


Configure an Azure AD application

Go to the microsoftloginconnectormanagement Espace (make sure to add yourself to the correct role first!). On the homepage you can add new applications and new resources. You only need the latter when you want to retrieve data from an external api that is also oAuth2 protected.

When creating a new application you need to input the name, the clientId and the ClientSecret. When you press Save 2 new tabs appear in the sidebar where you can configure the Espaces that need to use this new Azure AD application and the, optional, needed resources. 


Configure a Reactive application

To authenticate with Azure AD you need to use the following actions from the Microsoft Login Connection Reactive application: GetOAuth2AuthenticationURL. 

You will also need a reference to the OAuthProvider static entity from the Microsoft Login Connector Core application;


In your application open the Login action under Login Screen in the Common section. Add the GetOAuth2AuthenticationURL to the flow and use an ExternalURL destination to open the URL like the following example;

The only inputs needed for the GetOAuth2AuthenticationURL action are as such;


This should be all that is needed to logon. Please check the Demo application that is available in the Microsoft Login Connector Reactive component for more details including a logoff flow.


I hope this helps.


Kind regards,

Vincent

can anybody instruct me how to make ms login connector reactive workable?  

1. In the MicrosoftLoginConnectorManagement, I have added the new application (DONE)

     under detail tab, client ID and secret code are inputted. 

     under espaces tab, select the MicrosoftLoginConnectorReactiveDemo module 

     under resources tab, select Microsoft graph API 


2 in the MicrosoftLoginConnectorReactiveDemo's login action, getOAuth2AuthenticationURK has been added (DONE)



However, once I log in my ms account, it prompts below error.


Any steps I have missed?













Hi Jessica,

You are missing some configuration in Azure AD itself. In here you need to add a Redirect URI to the application you have created. 

To do this dot the following (in Azure);

  1. Open the "App Registrations" service (it's also part of Azure Active Directory service)
  2. Open you application
  3. Open the tab "Authentication"
  4. Add a Redirect URI. It should look something like this: https://<yourcompaniesenvironment>.outsystemsenterprise.com/MicrosoftLoginConnectorReactive/CallbackPage
  5. If you have more then one environment be sure to add one Redirect URI for each environment

Hope this helps,

Vincent

Thank Vincent. 


It works now.

Hi Jessica,

Good to hear it's working now. Please mark my answer as the solution so that others can find the answer quicker.

Kind regards,

Vincent 

Hi Vincent, 

Sry. it doesn't have a button for me mark it as solution.



mvp_badge
MVP

Hi Jessica & Vincent,

Only the original poster and OutSystems Forum moderators can mark an answer as a solution. I will do it.

Regards,

Daniel

Replying to this post because it won't let me create a new one for some reason.

Followed all steps and got:



Request Id: ca8fb57a-f8b4-4763-95a8-6f6bf5ca2100

Correlation Id: 321efed1-fa5b-43b9-9cec-8b3cf5663c96

Timestamp: 2020-09-03T15:08:18Z


Message: AADSTS900144: The request body must contain the following parameter: 'client_id'.


Searched on google but there wasn't much information. 


Here's the AD configuration


Hi Mariano,

This error is most likely due to some misconfiguration in the Microsoft Login Connector Management component. Be sure to have created the Azure AD application in there and also to have bound that application with the espace that will perform the login.

Greetings,

Vincent


ps, please try again to create a new thread even if it's in the regular forums. Hijacking threads makes other people find the solution to their similar problem a lot harder.

Vincent Koning wrote:

Hi Mariano,

This error is most likely due to some misconfiguration in the Microsoft Login Connector Management component. Be sure to have created the Azure AD application in there and also to have bound that application with the espace that will perform the login.

Greetings,

Vincent


ps, please try again to create a new thread even if it's in the regular forums. Hijacking threads makes other people find the solution to their similar problem a lot harder.

 Thank you. It did need further configuration. 

As to hijacking threads - I agree to a certain point. The topic of this thread is 'how to implement this component', and I believe this bit with the configuration falls under that umbrella. What's mentioned in this thread would have been very welcome on the Documentation part of the component

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