OAuth setup with Microsoft Entra ID #4745
woolfyx
started this conversation in
OAuth Provider Example
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Configuration Example
This guide allow you to setup the Mealie application SSO with an Entra ID tenant.
Notice
I've described 2 ways of working to manage application rights: via groups or via application roles. You can select you preferred approach.
Because the group option is only used for rights management and not groups management inside mealie application, both approach works here without any issues or limitations.
Personally I prefer to use roles because it's more adapted for roles management.
Prerequisites
Microsoft Entra ID configuration
Register a new application via the Microsoft Enta Admin center. Use your prefered name, which accounts you want to support (I have tested only the 'Single tenant' option) and put the following redirect Web URI : https://<<mydomain.tld>>/login
In the 'Authentication' tab, add the following URI to the 'Web' platform:
And ensure 'Access tokens' are enabled in the 'Implicit grant and hybrid flows' section
In the 'Certificates & secrets' tab, create a new client secret with the name and the duration of your choice. Save the value for later use.
In the 'API Permissions' tab, add the following permissions: 'email', 'openid', 'profile' and click on 'Grant admin consent'.
In the 'Token configuration' tab, add an optional claim, select 'Access' token and the 'email' claim.
If you choose the 'groups' approach: add the groups claim with the 'security' group type. If you are on a paid plan, you can select the option 'Groups assigned to the application' to reduce the token size.
If you choose the 'roles' approach: in the 'App roles' tab, create 2 roles with the name you want for users and admins. Select 'Users/Groups' as allowed member types, define a value (this is the value we will used in our mealie configuration later) and add a nice comprehensive description. Don't forget to select the last option to enable the role.
In the 'Overview' tab, collect the remaining information needed for the mealie configuration part:
Mealie configuration
If you choose to use application roles :
If you choose to use groups:
Update your Docker Compose stack via
docker compose up -d
.You should be able to see and use the 'Login with Entra ID' button
Beta Was this translation helpful? Give feedback.
All reactions