Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Artificial Intelligence
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Property Management
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Limit API key scope without creating a new active user.

Subscriure's

Get notified when there's activity on this post

This question has been flagged
securityAPIAI
1 Respondre
933 Vistes
Avatar
Rutger Hofste

I've just had a great conversation with Odoo Support that confirmed something I'd been hoping wasn't the case:

"Odoo counts every user in the system, including bot or service accounts, as a billable user. API keys are always tied to a user, so they inherit that user's access rights. There is currently no built-in way to create scoped API tokens with limited permissions independent of a user."

I'm posting this because I'd love to hear how other implementation partners and customers are handling the same problem in practice.

The use cases I'm dealing with on a single Odoo instance:

  1. AI assistant via MCP Pro (ChatGPT / Claude) — read-heavy, occasional writes on sale.order and crm.lead
  2. Public website form — must only create on crm.lead, with specific extra fields
  3. Cron job that syncs some stats from our SaaS into Odoo daily
  4. n8n workflow that comments on new partners after enrichment
  5. A Python script for one-off data imports — full access, but only run on-demand

Each one needs a different scope. Principle of least privilege says they should each have minimal permissions. Native Odoo gives me two options:

  • One technical user per integration — clean separation, but each one is a billable user (≈€30-40/month in our region). Five integrations = €150-200/month extra, purely for governance — the bot uses no UI, no email, no chat, no calendar, no human-seat features.
  • One shared "integration user" cheap, but every call collapses to the same user_id in the audit log. No way to distinguish "who did what" between five very different consumers. Not great when something goes wrong.

For enterprise customers I find option 1 economically unviable and option 2 weak on governance. Both feel wrong.

My questions to the community:

  1. Have you found a way to scope API keys (per-model, per-method, per-IP, per-time-window) without spinning up additional billable users? OCA modules, custom modules, anything?
  2. For per-call attribution on a shared user, are you doing anything beyond inspecting auditlog.http.request.user_context for self-asserted tags? I'm exploring patching res.users.apikeys._check_credentials to carry the matched key id forward into request.session — then the audit log can show which key called, not just which user. Curious if anyone has done this in production.
  3. Has anyone successfully negotiated a non-billable "integration user" / "service account" exception with Odoo SA for headless automation?
  4. Is there a planned change in Odoo 20 to either (a) allow API key scoping or (b) introduce a non-billable service-account user type? I haven't seen anything in the Odoo Experience 2025 keynote or the 20 preview material, but maybe I missed it.

I'm building an open-source AI governance module (pan_mcp_pro_governance, free on the App Store) and want to make sure I'm not solving a problem someone has already cracked. Patches and ideas very welcome.

Thanks

0
Avatar
Descartar
Benjamin Ruoff
I completely agree with this.

The way Odoo currently handles this feels pretty absurd to me. For API access, automation, and integrations, scoped permissions and proper attribution should be basic platform capabilities. Tying every API key directly to a full user account is, in my opinion, a questionable architectural decision. It does not really fit modern expectations around least privilege, auditability, and governance.

I find Viveks suggetion with the OCA plugin great but what makes it even more frustrating is that even if someone builds a proper solution as a custom module, you cannot install it on Odoo Online without moving to Odoo.sh. At some point, it really starts to feel less like a technical limitation and more like an upsell trap.  

For a system that positions itself as a serious business platform with strong integration capabilities, proper service accounts or scoped API tokens should not be a luxury. Not every technical access is a human user, and not every API key should inherit the rights of a full account.

Avatar
Vivek Kundaliya
Best Answer

This is an excellent question that highlights a real gap in Odoo's current architecture. Unfortunately, there is no native built-in solution for scoped API keys without additional billable users in Odoo.


The workarounds are exactly what you've described: either multiple billable users (expensive) or a shared integration user (weak audit trail).


For OCA modules, check: https://github.com/OCA/server-auth - there may be something in the "auth" modules that can help with key-level attribution.


I can provide a custom module that implements scoped API key management for Odoo - allowing you to create API keys with specific model/method restrictions, IP whitelisting, and per-key audit logging without requiring additional billable users. Reach me at custom@trewac.com

1
Avatar
Descartar
Rutger Hofste
Autor

Great suggestion. The OCA community indeed has great repos. However there was no support for v19 and api keys were linked to users, not scopes (user roles). I merged two oca repos (user roles and audit), and added functionality so you can optionally limit the scope for your api key (and therefore mcp) without adding new users and without changing what the user can do. https://github.com/pantalytics/odoo-mcp-pro-governance

Rutger Hofste
Autor

Perhaps you can check out if your modules could improve this one (feel free to do a PR)

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
AI governance (Data governance)
security AI
Avatar
Avatar
1
de maig 26
855
OdooPilot v0.1.0 — free open-source AI agent for Odoo (Telegram + WhatsApp, Claude/GPT-4/Groq/Ollama) — feedback and feature requests welcome
AI
Avatar
0
d’abr. 26
27
Introducing AI tools which can be used in Odoo version 17, 18 and 19
AI
Avatar
0
d’abr. 26
1509
Local Odoo 19 Database: Inventory not showing on Hand?
security
Avatar
0
d’abr. 26
5
Database stock product names are different than in the Odoo UI
API
Avatar
Avatar
1
de març 26
888
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now