#Get Azure Login Status From Backoffice

1 messages · Page 1 of 1 (latest)

mental frigate
#

I'm currently using the community AzureSSO package to enable login via an Azure AD and am wanting to add additional functionality into the back office for only the users who logged in via the Azure SSO. Local sign-in is still allowed.

I've explored the authResource, leading into the currentUser object and explored the Azure package source but can't find any variable that gets set that I can hook into with my Angular script. I did find that users who went through Azure had a new cookie called ARRAffinity but it's HttpOnly so can't access that in my Javascript.

Does anyone know a way I can achieve this please? I'm using Umbraco 13.

Package link: https://github.com/Gibe/Umbraco.Community.AzureSSO

GitHub

Azure AD SSO module for Umbraco. Contribute to Gibe/Umbraco.Community.AzureSSO development by creating an account on GitHub.

radiant pike
#

Haven't worked with this package, but got curious so just a suggestion here:

I can see that it will attempt to set groups based on Azure user roles if there is a user group matching the name:
https://github.com/Gibe/Umbraco.Community.AzureSSO/blob/main/src/Umbraco.Community.AzureSSO/MicrosoftAccountBackOfficeExternalLoginProviderOptions.cs#L93

If you have a default role in Azure for all users and create a user group with that name you could do a check on that role as an access criteria to the extra functionality for SSO users?

GitHub

Azure AD SSO module for Umbraco. Contribute to Gibe/Umbraco.Community.AzureSSO development by creating an account on GitHub.