0
votes

Is it possible to establish Azure AD SSO/session (with all required cookies) having only Access/ID tokens obtained using ADAL library?

Our scenario is quite similar with one described here:
We have Cordova app with ADAL library as plugin. We managed to authenticate users and get Access/ID tokens using ADAL. Then we initiate SAML SSO between Azure AD and our backend. It works fine the first time user authenticates using ADAL since it's popups microsoft login screen and after successful authentication it establishes a session with Azure AD. But when user logs out our app clears all cookies and next time ADAL gets's tokens from cache and does not provide the login screen which is OK. The problem is that SAML SSO does not work after that since session is gone (no cookies).
I know that ADAL is not quite designed to work with SAML, but maybe there are some dirty or not dirty workarounds to establish session with Azure AD having only access or id tokens?

1

1 Answers

0
votes

No, it is not possible. To get the session cookies, the user must login by themselves.

You can assist the user in logging in to the right account by specifying their AAD tenant id in the authority URI (instead of common), and by specifying [email protected] with their user principal name in the authorization call as an extra query parameter. They should then only need to enter their password (+ MFA etc.)