Last post Setting up SSO with Entra and Portainer (OAuth) I showed how to set up SSO with Oauth, and it was super straight forward.

With OIDC, or OpenID Connect, we can still set SSO up without sweating too much. I’m going to demonstrate this using Proxmox as it’s the hypervisor I migrated to for my homelab VMs after Broadcom’s decision to kill ESXi for home use.

We’re going to start off in our Entra portal and go to Applications -> App Registrations -> New Registration.

Microsoft Entra admin center App registrations page with App registrations in the menu and the New registration button highlighted

Fill out the name, select the single tenant option, and then web dropdown and fill out the url that hits your PVE login page, including port if necessary and then click next.

Entra Register an application form with name test-proxmox, single tenant selected, and a Web redirect URI pointing at the PVE login page

Once it’s made, go to Certificates & secrets -> New client Secret. Enter your description and dropdown for how long you want this secret to last. Click on Add when done and record the secret’s value as it will only be shown this one time. We haven’t gotten there yet, but this is going to be used in Proxmox’s Client Key field.

Entra Certificates and secrets blade for test-proxmox with the Add a client secret pane open, description proxmox and the 180 day expiry
Entra Certificates and secrets blade listing the new proxmox client secret, with its redacted value highlighted for copying

Next go to overview and record the Application (client) ID. This will be used in Proxmox’s Client ID field.

Entra Overview blade for test-proxmox with the redacted Application (client) ID highlighted under Essentials

Click on endpoints and at the bottom for the OpenID Connect metadata document, copy everything before the .well-known so that your url should look https://login.microsoftonline.com/<tenantid>/v2.0 this will be used for Proxmox’s Issuer URL field.

Entra Endpoints pane for test-proxmox with the OpenID Connect metadata document URL highlighted, tenant ID redacted

Now we have the bits Proxmox needs, let’s head to that. Highlight the Datacenter on the left blade, in the middle Permissions -> Realms and finally on the right click Add then OpenID Connect Server.

Proxmox Datacenter Permissions Realms view with the Add menu open and OpenID Connect Server highlighted

Enter the Issuer URL, Client ID, and Client Key fields from the values we grabbed in Entra. Realm is for your use to remember, but cannot be changed without making a new. Comment is what the user sees on login. Checkmark the Autocreate Users and Default checkboxes.

Proxmox Add OpenID Connect Server dialog with realm EntraSSO, comment Entra SSO, and Autocreate Users and Default checked

Now if we logout we’ll see the login has changed with our new Entra as the default.

Proxmox VE Login dialog with the Entra ID realm selected by default and a Login (OpenID redirect) button

Click login, select/login as your Entra account, and now we see in the top right we are logged in but with no real PVE access.

Proxmox web UI after Entra sign in showing the pve node with an empty resource list and the user menu redacted

So to resolve this, we logout once again. Change the dropdown to our Linux PAM realm, and login with our PVE admin credentials. In the Datacenter, go to Permissions -> Add -> User Permission.

Proxmox Datacenter Permissions Add menu with User Permission selected from Group, User and API Token Permission

For the User select the same account string you saw in the top right when you logged in. If we want it to have admin for everything for Path do / and Role is Administrator.

Proxmox Add User Permission dialog with path /, the Entra user redacted, role Administrator and Propagate checked

After that, log out and then in with the Entra realm/SSO and you should see everything to administer once again.