OAuth SSO
Requirements (self-hosted)
11.0.x
8.2
8.4
12.0.X
8.3
8.5
Install the plugin
Go to the marketplace. Download Oauth SSO and enable it

External Authentication
The plugin relies on GLPI's External Authentication feature. To be functional, it requires some initial setup:
Go to
Setup>Authentication>Other authentication methods.Go to the
Other authentication transmitted in the HTTP requestsection.The
Storage field for the identifier in the HTTP requestfield must be set toREMOTE_USER.The
Delete the domain from identifiers of the form identifier@domainfield can be set to Yes or No.
Users who authenticate will not be known to GLPI. Some fields must therefore be populated to create their record in GLPI with a minimum of information.
The fields that can be retrieved through SSO are as follows:
Last name: familyName
First name: givenName
Email: email
Email 2: email2
Phone: phone
Mobile: mobile
Title: title
Language: language

Save your Setup
You must also activate the automatic addition of users in GLPI to create them in GLPI at the time of authentication
In the
Setup>Authentication>SetupmenuThe
Automatically add users from external authentication sourcesfield must be changed toYes

Fetch information from user profile option
You can choose if you want to retrieve informations from the user profile. In setup > Oauth SSO applications select yes or no as required.
Apple
Create a new identifier
Go to this page to configure the Apple provider
Create a new "Identifier" in the
Identifierstab.

Select
Apps IDs

Then continue
Select
type=>App

Then continue
Select
Sign in with Applecapability

Team IDcan be found here (1).Client IDcan be found here (2).

Key File and Key ID
Go here to create Key file

Enter a name and description (1).

Select
Sign in with AppleClick on
Configure(2) to selectApps IDpreviously created

After registering your app, you will be able to retrieve:
Key File(1)Key ID(2)

You now have all the necessary information to configure your provider in the OauthSSO plugin.
Warning about fetching user information
Entra
Create an OAuth SSO entry in GLPI
In GLPI, click
Setup>OAuth SSOClick
+ AddSpecify:
a name
Active: Yes
OAuth Provider: Azure
An icon for the login page
Click
+ Add
Copy the callback URL, which you will need later

Register your application in Entra
First, register your application with your Entra Active Directory (Entra AD) client. This will provide you with an application ID for your application and allow it to receive tokens.
Connect to the Entra portal
Choose your Entra AD tenant by selecting your account in the top right corner of the page. Then select the Change directory navigation bar, then the desired tenant
Skip this step if you only have one Entra AD tenant under your account or if you have already selected one

In the Entra Portal, search for and select Entra Active Directory
From the left-hand Active Directory menu
select Application Registrations
Then New Registration.

Enter web in the redirect URI and paste the return URL of your GLPI instance:

Secret and certificate
In the certificates and secrets tab, create a new secret that will need to be transferred to your Oauth SSO application on the GLPI side:

Claims
In the Token configuration tab
Click on Add an optional claim
Add the 4 claims below:

API authorisations
GLPI must be able to read user information in order to use it for connection - In API permissions - Click on the API already present (Microsoft Graph for our example)


Select :
email
offline_access
profile
user.read
Then remember to save your changes.
Setup GLPI
Entra AD provides a description with the essential information you need:

Specify an application name visible to end users.

Copy the values from the fields above:
Application ID
The holder ID
The value of the secret copied in the previous step
Explanation of ID field
3 values are available in this insert:

User Principal Name (UPN): this option will show the full username of the user logging in (nom.prenom@mondomaine.com for example). If you want only the username to be visible (without the @mondomaine.com, see External authntication).
Entra user ID (OID): this option takes the object ID from the Entra AD. This ID will be used for the user login

Email address: This option specifies the user's email address. This field will be used for the login. If it is empty, the UPN will be used.
If you need to find your application in the Entra portal, select Application subscriptions, then Display all applications.
OIDC Role Declaration
"Roles" claim (for the "OauthSSO - Roles" rule criterion)
The "OauthSSO - Roles" criterion, available in GLPI's authorization assignment rules, allows a rule to match values from a claim named "roles".
Application roles: The "App registrations" and "Enterprise applications" sections represent two views of the same Entra application: one for developer configuration and the other for assignment to users and groups.
Declare a role under
App registrations>App roles

then assign it to a user or group under Enterprise applications > [your application] > Users and groups.

Once assigned, Entra automatically adds a roles claim to the ID token containing the role's Value (not its display name); no manual claim configuration is required with this method.
Adding rules
Go to
Administration>Rules>Authorizations assignment rulesand add a rule for each role created.

For users without a profile, you can go directly to the authorization assignment rules.
Creating a project
From your Google console (administrator access is required)
Go to your organisation then new project
Enter the name of your project
Click on Create

Return to your organisation,
Select your project

Setup OAuth access
From the menu, click on
APIs & ServicesThen
OAuth consent screen

Application Information
From the preview, click
Get startedEnter the application name and the user support email (users will be able to contact you with questions regarding their consent)

Audience
Indicate what type of audience will be able to use this application (here internal because the user who will be using the imap services is a user of the organization)

Contact information
Enter the contact name (this contact is notified of changes made to the application)

Google API Services User Data Policy
Accept the Google API Services User Data Policy and click
ContinueandCreate

Application Type
You now need to create an application client that will connect Google to your GLPI instance using an application ID and a client secret.
In the Clients tab, click
Create a client.Select Web Application as the application type.
Enter a name for your application.

Authorised redirect URIs
The callback URL must be specified here. This URL is found in GLPI under Configuration > OAuth SSO.
Getting the callback URL in GLPI
From
Setup>OAuth SSO>+ AddName your application
Specify the OAuth Provider
Click
+ Add

On the next screen, retrieve the callback URL

Copy and paste this URL into your Google app.

Click
Createto validate your application.
Application Information
The application is now created. The screen displays the application ID and client secret, which you will need to enter in GLPI.


Save your entry
Optional information
If you enable fetch of profile information from OAuth single sign-on, additional information will be required for it to be visible to GLPI.
From the Data Access tab, click
Add or remove scopesAdd the following levels:
auth/userinfo.email
auth/userinfo.profile
openid

From the home page, the new Oauth SSO login option will be visible:

OKTA
Create application
First, go to GLPI and download the Oauthsso plugin
Navigate to the Setup > Oauth SSO applications
Click on Add

Keep this window active and retain the callback URL :

In your OKTA interface, go to Applications
Create App Integration

Select option OIDC -- OpenID Connect in the 1st insert and Web Application in the second
Click on Next

Enter an application name and check the box Client credentials

Enter the return URL, retrieved above, in Sign-in redirect URIs.

Assignments
In the last box, select the option that suits you best (here we authorize all users present in OKTA)
Finally, click on Save

Setup GLPI
In GLPI, go back to the Oauth SSO plugin configuration window and enter your OKTA tenant information :

Give your provider a name, which will appear on the login page.
Indicate this as active
Enter OKTA as provider Oauth
Enter the application ID found in the application previously created in OKTA

Specify the ID field to be mapped with OKTA
Specify the customer secret available in OKTA in the previously created application

Enter the name of your OKTA instance (https://XXXXXXXXX.okta.com), available in the account creation confirmation e-mail.
Click on Add
In the plugin, you will see the approval message:

Now that the configuration is complete, you can test it with a user.


Keycloak
Create a REALM
After installing keycloak, go to the admin console:
Create your realm by clicking on master at the top left of your screen
Then create Realm
Give it a name that suits you
Click on Create

Create user
Then go to the Users tab
Then Create new user (we'll use a local user, but you can synchronize your LDAP if necessary)

Create your user according to your needs, remembering to check the Email verified box
Click on Create once you've entered your details.

Stay in your user file and click on Credentials
Then Set pasword

Configure the user password, taking care to indicate that the password is not temporary
Click on save then Save password

You can check that your configuration is correct by logging on to the user account console:
(Remember to adapt the realm name if you haven't named it GLPI).
You will then be able to connect to the record of the previously created user or one of your LDAP users.
Create client
Now we can register our GLPI application with Keycloak
Go to Clients
Create client

Give your application a client ID, which you'll need to pass on to your GLPI Oauth SSO configuration
Click on next and make sure on the next page that the standard flow and client authentication options are active
Click on Save
Keep this page active, we'll come back to it later.

Setup GLPI
Go to GLPI
In Setup > Oauth SSO applications click on add (at the top of your screen)

Start by retrieving the return URL and pasting it into Keycloak's valid redirect URIs field

Back in GLPI's Oauth SSO plugin configuration, fill in the required fields:

Give your provider a name, which will appear on the login page for users
Activate this plugin so that it is visible and usable on the login page
Choose Keycloak as your Oauth provider
Enter the client name set above
Retrieve client secret from Keycloak (client, client_name, credentials)

Enter the discovery URL: http://mondomaine/realms/monrealms/.well-known/openid-configuration.
Click on Add
In the plugin, to see the approval message:

Now that configuration is complete, you can test the connection with the user you created earlier, or with your LDAP user.



Rules for assigning authorisations
Remember that Oauth SSO authentication allows only authentication, in the sense that no user management is carried out following authentication.
In most cases, it will therefore be necessary to establish rules for assigning authorisations to your users (to give them a profile, for example).
To do this, go to Administration > Rules > Rules for assigning authorisations to a user.
There are no 'mandatory' rules, it's up to you to create the rule(s) that you feel best suit your needs according to your available criteria.
For example, a very simple rule
A very simple rule -> I want my users with SSO authentication to obtain the Self-Service profile.
So I set my criteria and my action :

Another example, using roles this time (see the Claims section above for Entra configuration):
A rule -> I want users with the Entra role "super.admin" to obtain the Super-Admin profile.
Criterion: OauthSSO - Roles is super.admin
Action: Profile = Super-Admin
The role name is a plain string compared against the criterion, GLPI does not infer a profile from it: the mapping between a role and a profile is entirely defined by the criteria and action you set in the rule.
Forcing SSO authentication
Using the Oauth SSO application configuration, you can mask the internal database connection field to force the connection with your SSO application
(setup > Oauth SSO applications > setup)

Resources
FAQ
If you have any questions about using the plugin, please consult our FAQ
Last updated

