[Microsoft Login Connector] How to implement logout and silent login for azure AD

Forge Component
(7)
Published on 26 Feb (4 weeks ago) by Paul Davies
7 votes
Published on 26 Feb (4 weeks ago) by Paul Davies

Hi Team

i am using your component and successfully implemented Azure AD Integration.but i have two question.

1)how to implement silent login

2)how to implement logout.i saw logout action is there.In Logout section i called that action.but some parameter i have to pass.can you tell me about parameter details which i have to pass.


Thanks

Arkyadeep

Hi,

Once you are logged in, your token will expired and new tokens will be requested. As far as I know you have at least once authenticate yourself. There is no SSO based on login to your computer.

The parameter on the SendSignoutRequest is optional. If provided that is the url to which you are redirected after logout request is processed in Azure AD.

Regards,

Daniel

Daniël Kuhlmann wrote:but currently my scenario is given below

I logged in with azure AD user.but after successful login suppose im logged out from my application.Againt that logged out button i called Outsystem UserLogout action and SendSignOut request with Below URL:

SendSignoutRequest

 After logout successfully it is redirected to our application login screen but azure portal log out is not done.it means if i open azure Portal then we saw that user is not logged out from azure portal. is it correct?because if i am trying to login our application then it is asking for azure ad credential.my clients want if i logged out from our application then it will automatically logged out from azure portal also.is it possible?i think its not possible.

Hi,

Once you are logged in, your token will expired and new tokens will be requested. As far as I know you have at least once authenticate yourself. There is no SSO based on login to your computer.

The parameter on the SendSignoutRequest is optional. If provided that is the url to which you are redirected after logout request is processed in Azure AD.

Regards,

Daniel



Hi,

SendSignoutRequest only purpose is to log you also out of AzureAD.

Do you get an exception or error message in Azure AD?

Regards,

Daniel


Daniël Kuhlmann wrote:

Hi Daniel

i am getting below error message

"Failed to parse response of the method 'Logout' of the 'LoginMicrosoftonline' REST API:
Parsing '': Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
"

Hi,

SendSignoutRequest only purpose is to log you also out of AzureAD.

Do you get an exception or error message in Azure AD?

Regards,

Daniel




try it without "" (empty string) on the parameter.

Your app exception should show the login again anyhow.

Arkyadeep Bharadwaj wrote:

Hi 

i am passin my application login screen in below parameter in sendsignoutrequest

SyntaxEditor Code Snippet

PostLogoutRedirectUri

Daniël Kuhlmann wrote:

Hi Daniel

i am getting below error message

"Failed to parse response of the method 'Logout' of the 'LoginMicrosoftonline' REST API:
Parsing '': Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
"

Hi,

SendSignoutRequest only purpose is to log you also out of AzureAD.

Do you get an exception or error message in Azure AD?

Regards,

Daniel






Arkyadeep Bharadwaj wrote:same error is coming.

Failed to parse response of the method 'Logout' of the 'LoginMicrosoftonline' REST API:
Parsing '': Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Arkyadeep Bharadwaj wrote:

Hi 

i am passin my application login screen in below parameter in sendsignoutrequest

SyntaxEditor Code Snippet

PostLogoutRedirectUri

Daniël Kuhlmann wrote:

Hi Daniel

i am getting below error message

"Failed to parse response of the method 'Logout' of the 'LoginMicrosoftonline' REST API:
Parsing '': Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
"

Hi,

SendSignoutRequest only purpose is to log you also out of AzureAD.

Do you get an exception or error message in Azure AD?

Regards,

Daniel








one another thing in our we have two type user .one is outsystems users and another one is Azure AD user.we saw Azure AD users data we are storing in outystems user entity after successful login.from user entity how to know that which user Outsystem user and which one is Azure AD user.because both are storing password in encrypted format.

Arkyadeep Bharadwaj wrote:

Arkyadeep Bharadwaj wrote:same error is coming.

Failed to parse response of the method 'Logout' of the 'LoginMicrosoftonline' REST API:
Parsing '': Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Arkyadeep Bharadwaj wrote:

Hi 

i am passin my application login screen in below parameter in sendsignoutrequest

SyntaxEditor Code Snippet

PostLogoutRedirectUri

Daniël Kuhlmann wrote:

Hi Daniel

i am getting below error message

"Failed to parse response of the method 'Logout' of the 'LoginMicrosoftonline' REST API:
Parsing '': Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
"

Hi,

SendSignoutRequest only purpose is to log you also out of AzureAD.

Do you get an exception or error message in Azure AD?

Regards,

Daniel








Arkyadeep Bharadwaj

If it helps these two components are using the connector which you may want to look at the implementation.

https://www.outsystems.com/forge/component-overview/4004/enterprise-risk-management

https://www.outsystems.com/forge/component-overview/4269/gdpr-data-dictionary




 


Paul Davies wrote:

Arkyadeep Bharadwaj wrote:

Arkyadeep Bharadwaj wrote:same error is coming.

Failed to parse response of the method 'Logout' of the 'LoginMicrosoftonline' REST API:
Parsing '': Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Arkyadeep Bharadwaj wrote:

Hi 

i am passin my application login screen in below parameter in sendsignoutrequest

SyntaxEditor Code Snippet

PostLogoutRedirectUri

Daniël Kuhlmann wrote:

Hi Daniel

i am getting below error message

"Failed to parse response of the method 'Logout' of the 'LoginMicrosoftonline' REST API:
Parsing '': Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
"

Hi,

SendSignoutRequest only purpose is to log you also out of AzureAD.

Do you get an exception or error message in Azure AD?

Regards,

Daniel








Arkyadeep Bharadwaj

If it helps these two components are using the connector which you may want to look at the implementation.

https://www.outsystems.com/forge/component-overview/4004/enterprise-risk-management

https://www.outsystems.com/forge/component-overview/4269/gdpr-data-dictionary




 



what is this

Daniël Kuhlmann wrote:Sir Please help to resolve this.till now its not working.

try it without "" (empty string) on the parameter.

Your app exception should show the login again anyhow.



Can you share more info (error log maybe?)

Daniël Kuhlmann wrote:what error log you want.u r talking about service center error log or anything else

Can you share more info (error log maybe?)



in service ceneter i am betting below error details


981a44a3-9789-4224-94c6-51b35ab468f0
Time of Log:
2019-03-07 10:13:03
eSpace:
FDA
Tenant:
Users
User:

Session Id:
1sae1erhnqrdvrw1wege4emb
Server:
S52WA-LT6LSO
Module:

Message:


Failed to parse response of the method 'Logout' of the 'LoginMicrosoftonline' REST API:
Parsing '': Unexpected character encountered while parsing value: <. Path '', line 0, position 0.



Environment InformationeSpaceVer: 0 (Id=5291, PubId=0, CompiledWith=11.0.108.2)
RequestUrl: https://tmai-dev-dev.outsystemscloud.com/FDA/InvoiceLists.aspx (Method: POST)
AppDomain: /LM/W3SVC/8/ROOT/FDA-1590-131964271057889688
FilePath: C:\OutSystems\Sandboxes\K3ABZT005\Platform Server\running\FDA\InvoiceLists.aspx
ClientIp: 119.151.72.80
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 4088 ('w3wp', Started='2/28/2019 6:02:41 PM', Priv=716Mb, Virt=18638Mb)
TID: 66
Thread Name:
.NET: 4.0.30319.42000
Stack:
Failed to parse response of the method 'Logout' of the 'LoginMicrosoftonline' REST API:
Parsing '': Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

   at ssAzureADConnector.CcLoginMicrosoftonline.ActionLogout(HeContext heContext, ICcLoginMicrosoftonlineCallbacks _callbacks, String inParampost_logout_redirect_uri, STTokenStructure& outParamResponse)
   at ssAzureADConnector.Actions.ActionSendSignoutRequest(HeContext heContext, String inParamPostLogoutRedirectUri)
   at ssFDA.RsseSpaceAzureADConnector.MssSendSignoutRequest(HeContext heContext, String inParamPostLogoutRedirectUri)
   at ssFDA.Flows.FlowCommon.WBlkLoginInfo.CommandLogout(HeContext heContext)

Hi 

Can anyone please help me to implement log out functionality

Solution

Hi Arkyadeep,

Build the logout url like - 

Where FinalLogoutUrl is the encoded return url of your application.

Instead of calling the logout api, directly redirect the above url and it will work.

 It will logout from Microsoft and return to the url you set.

Thanks

Sourav

Solution