Microsoft Azure Portal Signup
One-click Microsoft sign-in for your portal & website. Existing users log straight in, brand-new users are auto-created as portal users — no more “Access Denied” on first login.
The Problem It Solves
A first-time Microsoft user hits “user not found / Access Denied”
because no matching Odoo login exists. Email is only read from the
email claim, so Graph accounts are missed and duplicate
users get created on every sign-in.
The user is logged in directly. If they already exist they are matched and linked; if not, a clean portal account is created from their Azure profile — reusing any existing contact so nothing is duplicated.
Auto Login & Auto Sign-Up Flow
What happens the moment a user clicks “Sign in with Microsoft”
Behind the scenes
User matched by oauth_uid → token refreshed → logged in.
Existing user found by email → Microsoft identity linked → logged in.
A partner with the same email is attached, so no duplicate contact is created.
A new portal user is created from the Azure profile and dropped straight into the portal.
Key Features
Authenticated users are logged in immediately after the Azure callback — no extra steps.
First-time users become portal users automatically, built from their Azure name & email.
Reads the email from every Microsoft claim (email, upn, preferred_username, mail, userPrincipalName…).
Existing users are linked and existing contacts are reused instead of duplicated.
The originating website is carried in the OAuth state so new users land in the correct company.
How It Works
The module extends Odoo’s standard OAuth sign-in. On the Azure callback it identifies the user by their Microsoft identity, falls back to email matching across all Microsoft claim keys, and only creates a new account when none exists — always as a portal user.
The website the login started from is stashed in the OAuth state,
so multi-website deployments assign every new user to the right company.
Microsoft Azure Configuration
A quick one-time setup connects Odoo to your Microsoft Azure application
In the Microsoft Entra / Azure portal, register an application and note its Application (client) ID.
Under Authentication, add the redirect URI https://<your-domain>/auth_oauth/signin (Web platform, HTTPS).
In Odoo, enable Settings → General Settings → OAuth Authentication, then open the Microsoft Azure provider and paste the Client ID.
Save and enable the provider — the “Sign in with Microsoft” button now appears on your login page.
Requirements
Depends on Odoo’s standard authentication apps — all included with Odoo:
Compatible with Odoo 19.0
Techspawn Solutions Pvt Ltd
www.techspawn.com
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 107 |
| Technical Name |
ts_microsoft_portal_signup |
| License | LGPL-3 |
| Website | http://www.techspawn.com |
Please log in to comment on this module