626
Views
16
Comments
Solved
[Microsoft Login Connector - Traditional Web] How to implement logout and silent login for azure AD
Question
Forge component by Paul Davies
12
Published on 09 Aug 2020

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

Rank: #367
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

mvp_badge
MVP
Rank: #18

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

mvp_badge
MVP
Rank: #18

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


mvp_badge
MVP
Rank: #18

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

Your app exception should show the login again anyhow.

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.

mvp_badge
MVP
Rank: #18

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

Rank: #367
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