OIDC authentication
Medulla allows you to use an OpenID Connect (OIDC)-compatible identity provider to authenticate users on the platform.
OpenID Connect is an authentication protocol based on OAuth 2.0. It allows Medulla to delegate authentication to an external identity provider, also known as an Identity Provider or IdP, while retaining management of profiles, entities, ACLs, and authorizations within Medulla.
This architecture allows you to centralize identity management for your organization and provide a unified login experience—or Single Sign-On (SSO)—with the other applications in your information system.
Medulla is compatible with identity providers that support the OpenID Connect standard, including:
- Microsoft Entra ID;
- Keycloak;
- Authentik;
- Okta;
- Google Workspace;
- Auth0;
- Ping Identity;
- FusionAuth;
- any other OpenID Connect-compatible identity provider.
Using OIDC allows you to, among other things:
- centralize user authentication;
- take advantage of Single Sign-On;
- implement multi-factor authentication if it is enabled by the identity provider;
- enforce the organization’s security and conditional access policies;
- simplify the management of user account lifecycles.
Important:
Authentication and authorization are two distinct mechanisms. The OIDC provider verifies the user’s identity, while Medulla remains responsible for managing the user’s profiles, ACLs, entities, and permissions. A user may therefore be successfully authenticated without immediately having the necessary permissions to access the platform.
How OIDC authentication works
When a user logs in to Medulla using OIDC authentication, the following process takes place:
- The user accesses the Medulla interface
- Medulla redirects the user to the OIDC identity provider
- The user authenticates with the identity provider
- The identity provider enforces its own security policies, including multi-factor authentication or conditional access
- After the identity is validated, the provider returns an identity token to Medulla
- Medulla verifies the token’s validity and the identity information it contains
- If the user does not yet exist in Medulla, their account is created automatically
- Medulla applies the profiles, entities, and permissions assigned to that user
Note:
During the first authentication, no permissions are automatically granted to the new user. A Medulla administrator must then assign a profile and an entity to the user.
Prerequisites
Before configuring OIDC authentication, verify the following:
- the OpenID Connect identity provider is operational;
- an application or client dedicated to Medulla has been created with the identity provider;
- the Client ID is available;
- the Client Secret is available when required;
- the discovery URL or the various OIDC URLs are available;
- the authorized redirect URLs are correctly declared;
- the Medulla server can connect to the identity provider via HTTPS;
- the identity provider’s TLS certificates are valid and recognized by the Medulla server;
- the Medulla server’s time is synchronized with an NTP source;
- the required scopes and claims are configured on the identity provider’s side.
Important:
A significant time difference between the Medulla server and the identity provider can cause OIDC tokens to be rejected, even if the rest of the configuration is correct.
Information required for configuration
Medulla’s OIDC configuration generally requires the following information:
|
Parameter |
Description |
|
Client ID |
Public identifier of the Medulla client or application registered with the identity provider |
|
Client Secret |
Secret used to authenticate Medulla with the OIDC provider, when required |
|
Discovery URL |
Address of the OpenID Connect discovery document containing the provider’s various URLs |
|
Authorization Endpoint |
Address to which the user is redirected to authenticate |
|
Token Endpoint |
Address used by Medulla to obtain or validate tokens |
|
UserInfo Endpoint |
Address used to retrieve user information, when applicable |
|
Redirect URI |
The URL to which the user is redirected back to Medulla after authentication |
|
Scopes |
Information that Medulla is authorized to request from the identity provider |
|
Claims |
Attributes returned in the token, such as the ID, email address, last name, or first name |
Recommended scopes
The following scopes are generally required:
openidprofileemail
The openid scope is required to use OpenID Connect. The profile and email scopes allow you to retrieve the key information needed to create a user account.
Configure the identity provider
From your identity provider’s administration console:
- Create a new OIDC application or client dedicated to Medulla
- Select an authentication flow compatible with a web application
- Specify the redirect URL provided for your Medulla environment
- Authorize the necessary scopes, including
openid,profile, andemail - Verify that the expected claims are present in the identity token
- Retrieve the Client ID
- Generate or retrieve the Client Secret if necessary
- Note the OpenID Connect discovery URL
- Save the changes
Caution:
The Client Secret is sensitive information. It must never be published in documentation, transmitted over an unsecured channel, or stored in a tool accessible to unauthorized users.
Discovery URL
Most identity providers expose a discovery document at an address similar to:
https://fournisseur.example.com/.well-known/openid-configuration
For some providers, the domain, tenant, or realm must appear in the address.
Generic example with a realm:
https://fournisseur.example.com/realms/mon-realm/.well-known/openid-configuration
This document allows you to automatically retrieve:
Configure OIDC in Medulla
Enter the information obtained from the identity provider into the Medulla configuration:
- the Client ID;
- the Client Secret, when required;
- the discovery URL or the various OIDC endpoints;
- the requested scopes;
- the claims used to identify and create users;
- Medulla’s public URL and the corresponding redirect URL.
After saving the configuration, use an incognito browser window to test the authentication process without reusing an existing session with the identity provider.
Best practice:
Keep a functional native Medulla administrator account active during configuration and initial OIDC testing. This account will allow you to correct the configuration or grant permissions to the first OIDC users.
Claims used to create the user
The OIDC provider returns user information in the form of claims.
Commonly used claims are:
|
Claim |
Usage |
|
|
User’s unique identifier at the identity provider |
|
|
Preferred user identifier |
|
|
User's email address |
|
|
User's first name |
|
|
User's last name |
|
|
User's full name |
Important:
The claim used as the ID must be stable and unique. Avoid using an attribute that is likely to change frequently if such a change could result in the creation of a second account in Medulla.
A user’s first login
After configuring OIDC authentication, ask the user to log in to Medulla for the first time.
This first login allows Medulla to:
- redirect the user to the identity provider;
- validate their authentication;
- retrieve the claims returned by the provider;
- automatically create their account in the local database;
- make the user available in the Medulla administration interface.
During this first login, it is normal for the user to see the following message:
You do not have required rights
Note:
This message indicates that OIDC authentication is working and that the user account has been created. This is not an authentication error: it is simply that no profile or entity has been assigned to the user yet.
Assign permissions to an OIDC user
Step 1 – Log in as an administrator
Log in to Medulla using an account that already has the necessary permissions to manage users and entities.
For the initial setup, it is recommended to use the native root administrator account.
Step 2 – Open user management
Go to the module:
Administration
└── Entities Management
Select the root entity or the relevant entity, then click:
Manage Users
Step 3 – Search for the user
Search for the user automatically created during their first OIDC login.
On the row corresponding to that user, click:
Edit
Step 4 – Assign permissions
Configure the following settings:
- the user profile;
- the authorized entity;
- recursive mode, if the profile should apply to all subentities of the selected entity.
Available profiles include:
- Super-Admin;
- Admin;
- Technician.
Then save the changes.
Principle of least privilege:
Grant only the permissions necessary for the user’s tasks. The Super-Admin profile should be reserved for individuals responsible for the full administration of Medulla.
Validate the user’s access
Once permissions have been assigned:
- Ask the user to log out of Medulla
- If necessary, also ask them to log out of their identity provider
- Ask them to log back into Medulla via OIDC
- Verify that they have access to the entities and features corresponding to their profile
The new permissions will take effect upon re-login.
Troubleshooting
The user receives the message “You do not have required rights”
This message means that:
- OIDC authentication is working;
- the user’s account has been created in Medulla;
- no profile or entity has been assigned to them yet.
Log in as an administrator, assign a profile and an entity to the user, and then ask the user to log in again.
The user does not appear in Medulla
Verify that:
- the user has made an initial login attempt;
- authentication with the identity provider was successful;
- the user exists and is active with the identity provider;
- the user is authorized to access the Medulla application;
- the Client ID and Client Secret are correct;
- the redirect URL exactly matches the one declared with the provider;
- the required scopes are authorized;
- the required claims are present in the token;
- the Medulla server can connect to the OIDC endpoints via HTTPS;
- there are no errors in the Medulla logs or in those of the identity provider.
The user is immediately redirected back to the authentication page
A redirect loop can occur, for example, due to:
- an incorrect Redirect URI;
- a discrepancy between Medulla’s internal URL and its public URL;
- incorrect handling of headers by a reverse proxy;
- a cookie or session issue;
- an incorrect Client Secret;
- a token validation error.
Verify that the public URL used by the user matches the one registered with the identity provider.
The provider is rejecting the redirect URL
Verify that the Redirect URI:
- is registered in the OIDC client configuration;
- uses the correct HTTP or HTTPS protocol;
- uses the correct DNS name;
- uses the correct path;
- does not contain any extra slashes or other unexpected characters.
Note:
Some providers perform a strict comparison of the redirect URL. Even a minor difference can cause the request to be rejected.
The token is rejected by Medulla
Check:
- the server’s NTP synchronization;
- the token issuer;
- the token’s audience;
- the token's expiration date;
- the address of the provider’s public keys;
- the TLS certificates;
- the match between the Client ID and the expected audience.
The user was created with incorrect information
Verify the claims used for:
- the user's ID;
- their email address;
- their first name;
- their last name;
- their full name.
A mismatch between the returned claims and the attributes expected by Medulla may result in the creation of a user that is incomplete or difficult to identify.
A second account is created for the same user
This behavior may occur if the claim used as an identifier has changed or if multiple providers return different identifiers for the same person.
Verify that the claim chosen as the identifier:
- is unique;
- remains consistent over time;
- is returned identically with every login.
Security best practices
To ensure reliable and secure operation of OIDC authentication, it is recommended that you:
- use HTTPS exclusively;
- protect the Client Secret in a suitable secret manager;
- periodically renew the Client Secret;
- limit Redirect URIs to only the necessary addresses;
- limit scopes to only the information required by Medulla;
- enable multi-factor authentication with the identity provider;
- synchronize the Medulla server with a reliable NTP source;
- maintain a native Medulla administrator account for recovery operations;
- require new users to log in for the first time before granting them permissions;
- limit the number of Super-Admin accounts;
- regularly review assigned profiles, entities, and ACLs;
- disable access with the identity provider when a user leaves the organization.
Important:
Deactivating an account with the OIDC provider normally prevents the user from authenticating again, but does not automatically delete the account or its permissions stored in Medulla. It is recommended to regularly review the accounts and permissions retained on the platform.
Information to provide to support
If the problem persists, please provide Medulla Support with the following information:
- the name of the identity provider used;
- the OIDC discovery URL;
- the Client ID, if sharing it is permitted by your security policy;
- the public URL of the Medulla platform;
- the redirect URL declared with the provider;
- the configured scopes;
- the names of the claims used, without transmitting a token containing personal data;
- the exact error message;
- the date and time of the attempt;
- the corresponding logs;
- the version of Medulla used.
Caution:
Never transmit the Client Secret, a password, an access token, a full ID Token, a private key, or any information that could be used to impersonate a user.
Summary
|
Element |
Description |
|
Protocol |
OpenID Connect |
|
Authentication |
Delegated to the identity provider |
|
Authorization |
Managed in Medulla |
|
Automatic account creation |
Yes, upon first login |
|
Automatic assignment of permissions |
No |
|
Action after first login |
Assign a profile, an entity, and recursive mode if necessary |
|
“You do not have required rights” message |
Authentication successful, but no permissions assigned |
|
Recommended scopes |
|
|
Communications |
HTTPS |
|
Time synchronization |
NTP recommended |
|
New login after permissions are granted |
Yes |
|
Backup account |
Medulla native administrator account recommended |
Best practice:
When a new user needs to access Medulla via OIDC, always ask them to log in for the first time before granting them permissions. This initial authentication allows Medulla to automatically create their account. Once the profile and entity have been assigned, logging in again will grant the user access to the authorized features.

