question

GeoffreyvanWyk-0769 avatar image
0 Votes"
GeoffreyvanWyk-0769 asked saldana-msft edited

Is it possible to use Microsoft Graph via AJAX to determine whether a user is already logged into Azure Active Directory in the web browser?

We have a Moodle-based web application that can authenticate users via SAML against an Azure Active Directory enterprise application.

If a user is signed into Azure Active Directory, the visits our Moodle directly in the browser (instead of visiting via the My Applications portal), we want the user to be automatically signed into Moodle as well. This can be achieved via some configuration in Moodle and the Moodle SAML plug-in, but this would prevent unauthenticated visits to Moodle.

If it is possible, we would like to use some API, perhaps Microsoft Graph, to check via AJAX whether the user of the web browser is already signed into Azure Active Directory and belong to our tenant and the correct enterprise application.

azure-active-directoryazure-ad-saml-sso
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I think we can check if the accesstoken or msalAccount are cached in localStorage in the browser.
![114861-image.png


1 Vote 1 ·
image.png (48.2 KiB)

0 Answers