Microsoft Entra ID (formerly Microsoft Azure AD) is a SaaS identity provider which supports the OpenID Connect (OIDC) protocol. As such, we may use it for single sign-on authentication in Memos. This guide assumes you already have an Entra ID tenant (with a free or paid plan) configured, have users added to your environment and have access to the portal with proper rights.
Step 1: Configure Entra ID
Create a new Application Registration
- In the sidebar navigate to Identity > Applications > App registrations
- Create a new registration
- Set "Name" as
Memos
(or the display name you want) - Select supported account you desire. Generally the default option
Accounts in this organizational directory only
is the correct one. - Set the platform of your "Redirect URI" to
Web
- Set the "Redirect URI" to
https://<YOUR-MEMOS-DOMAIN>/auth/callback
- Click "Register" at the bottom of the page
Setup API permissions
- In the sidebar of the application page, navigate to API permissions
- Click "Add a permission" in "Configured permissions" section
- Select "Microsoft Graph"
- Select "Delegated permissions"
- Select the OpenId permissions
email
,openid
,profile
and click "Add permissions" - Click "Grant admin consent" in "Configured permissions" section and confirm.
Create a client secret
- In the sidebar of the application page, navigate to Certificates & Secret
- Click "New client secret" in "Client secrets" section
- Add a description, select the prefered expiration date and click "Add"
- Store the Secret "Value" somewhere for the Memos configuration
Step 2: Obtaining the necessary endpoints for Memos
With the Application registration ready, all we need now is to copy all the credentials and authentication endpoints.
- In the sidebar of the application page, navigate to Overview
- Copy down the
Application (client) ID
information display in the "Essentials" section - Click "Endpoints" on top of the page
- Copy down the URLs under
OAuth 2.0 authorization endpoint (v2)
andOAuth 2.0 token endpoint (v2)
Step 3: Configuring Memos
Finally, we can open Memos and add Entra ID as an authentication option.
Log into your Memos account and select the "Settings" button
Click on "SSO"
Click the "Create" button
Type = OAUTH2
Template = Custom
Fill out the following details:
- Set "Name" as anything you wish, such as "Microsoft Entra ID". This will appear on a button on the Memos login page
- Paste your
Client ID
withApplication (client) ID
data - Paste your
Client Secret
with value retrieved in Step 1 - Paste your
Authorize URL
into the "Authorization endpoint" - Paste your
Token URL
in the "Token endpoint" - Paste
https://graph.microsoft.com/oidc/userinfo
in the "User endpoint" - Set "Scopes" as
openid profile email
- Set "Identifer" as
email
- (Optional) Set "Display name" as
given_name
(for the first name) orname
(for the full name) - (Optional) Set "Email" as
email
Congratulations! You may now log into Memos using Entra ID! 🥳