If your Art of WiFi Captive Portal, reporting scripts, or other UniFi integrations suddenly started throwing errors after Ubiquiti's MFA rollout, you're not alone. Beginning July 22, 2024, Ubiquiti requires MultiâFactor Authentication (MFA) for UI.com (cloud) accounts. Automated services and applications that attempt to log in with those cloud credentials get stalled at the second factor prompt and effectively lose API access. The original fix was to create a dedicated local admin (service) account on your UniFi console and use that for all programmatic API connections. Local accounts are not subject to the cloud MFA requirement and continue to authenticate cleanly.
đ Our captive portal solutions and the UniFi Device Search Tool now support two additional authentication options: a Network Application API Key (for direct connections) and a Site Manager API Key (for connections via unifi.ui.com). More Art of WiFi products will follow soon. Read our companion guide to understand the differences and choose the best method for your setup:
đ UniFi API Authentication: Local Admin vs. API Key vs. Site Manager
You should take action if you use any external tool that signs into the UniFi Network Application / controller on your behalf, including:
Art of WiFi Captive Portal & reporting tools
Other 3rd party, external, captive portal solutions
Home/business automation platforms (Home Assistant, etc.)
Custom scripts built on our UniFiâAPIâclient library
Monitoring, billing, or MSP dashboards that poll UniFi stats
All of these rely on unattended logins through the API; MFA breaks unattended logins when using UI.com credentials. Community reports confirm breakage and successful resolution by switching to a local admin account.
Create a dedicated local admin account (service account). Disable Remote/Cloud access for it. Grant the minimum role required (often Site Admin or View Only). Update your integration to use that username/password.â Thatâs it.â
âOr,ââ if you prefer keyless authentication or need to connect through unifi.ui.com, see our ââfull comparison of all three authentication methodsâ.
UI.com accounts now require MFA; even if you don't enable an appâbased factor proactively, email verification is autoâenabled after the enforcement date. Programmatic tools cannot satisfy an interactive second factor, so authentication fails or loops. Partners in the UniFi ecosystem (captive portal vendors, monitoring tools, automation frameworks) flagged this in advance because their products would lose access without a nonâMFA login path. Local admin accounts remain exempt, which is why nearly every vendor (including us) recommends moving integrations to a local account.
Repeated MFA / verification prompts to the account ownerâs email or authenticator app.
API calls returning 401 Unauthorized in logs.
External applications such as captive portals fail to connect. These patterns were widely reported in community forums when MFA enforcement began.
UI.com (cloud) account: Centralized identity hosted by Ubiquiti; used for remote management and marketplace services. Subject to mandatory MFA.
Local admin account: Lives only on the UniFi console/Network Application you create it on. Can be scoped to specific sites and roles. Operates in localâonly mode with no cloud linkage; MFA not imposed. Official UniFi documentation distinguishes between remote cloud admins and localâonly management and shows where to add them in the Network Application UI.
Most captive portal and reporting integrations need read/write access to the API â Site Admin is typically sufficient. For pure reporting (readâonly stats pulls) you can grant View Only to reduce risk. UniFiâs role matrix (Full Management, Site Admin, View Only, Hotspot Operator, etc.) lets you scope the least privileges required. Our older advisory showed Site Admin as the safe default; choose tighter roles if your workflow allows.
Good practice: Name the account something serviceâoriented (e.g.,
aow-cp-svc), do not reuse a personal email, and store the password in a secure vault.
Confirm which UniFi platform youâre on (UniFi OS console such as UDM, UCG, UX, etc. vs. selfâhosted software install).
Confirm your running version; menu names changed between Network Application 7.x, 8.x, 9.x, and 10.x.
Decide the role and which sites the account should see.
Log in to the UniFi OS Console web UI with an existing admin.
Go to Admins & Users (label may read Admins in some versions).
Create New User( + ).
Check the Admin checkbox.
Restrict to local access only / Disable Remote Access so the account is local (wording varies by version).
Username & Password: Enter a username (doesnât need to be an email) and set a strong password.
Role / Permissions: Uncheck Use preâdefined role if present; assign Site Admin (or minimum required) for the Network Application. Select None for other sections where no permissions are needed.
Create.
Test login locally at https://<console-ip>/ using the new credentials.
Sign in to the Controller/Network Application.
Navigate to Admins.
Select Current Site if you wish to restrict the Local Admin account to the current site.
Click on plus icon (+) to add a new admin.
Uncheck Remote Access (ensures localâonly).
Select Set Admin Password (check the box if required) and enter the username and password.
Assign Role: Choose Site Administrator (or View Only for readâonly/reporting).
Invite / Save, then log out and back in with the new local credentials to finalize.
These steps mirror the guidance we published in 2024 and remain valid; wording may vary in 8.x/9.x/10.x UI but the flow is unchanged.
Open your portalâs or toolâs âUniFi connection settingsââ and replace the stored credentials with one of the supported authentication methods:â
âLocal admin username/passwordââ (covered in this article). The classic approach, works with all console types including the legacy self-hosted Network Application.â
âNetwork Application API Keyââ. Requires the latest release of your Art of WiFi product and a direct connection to a UniFi OS console or Server. No username/password needed.â
âSite Manager API Keyââ. Requires the latest release of your Art of WiFi product; connects through unifi.ui.com, ideal when your console has a dynamic IP, is behind CGNAT, or is otherwise not directly reachable. UniFi OS console or Server only.â
âFor a detailed comparison of when to use each method, see our ââcompanion guideâ.
âIf you connect over WAN using the local admin method, ensure firewall rules permit HTTPS (port 443 on UniFi OS consoles, port 11443 on UniFi OS Server, or 8443 on older software controllers) from your portal host to the console.â
Even though this article is about API credentials, itâs a good moment to revisit guest authentication options you can add to your UniFi guest network with the Art of WiFi captive portal:
Email registration & verification (great for marketing followâup).
SMS / mobile phone verification with oneâtime passwords (OTP).
Azure Entra ID / Microsoft 365 (OAuth2) single signâon for students/staff.
Social logins (Facebook, Instagram) and sponsored access approval flows.
Practice | Why do it? | Where set? |
|---|---|---|
Least privilege (View Only vs Site Admin) | Limits damage if credentials leak. | Role picker when creating the admin. |
Localâonly, no Remote Access | Prevents MFA prompts; keeps credentials usable for integrations and automation. | Admin creation dialog. |
Dedicated account per integration | Easier to audit logs & revoke without breaking others; recommended by multiple vendors when adapting to MFA. | Create multiple local admins. |
Site-specific accounts | Limits damage if credentials leak. | On self-hosted controllers/Network Applications or CloudKeys; select Current Site before creating the admin account. |
Strong, vaulted passwords | Service accounts are highâvalue targets. | Use password manager/secret vault. |
Rotate credentials (set reminder) | Mitigates longâlived credential risk. | Ops runbook. |
đ UniFi API Authentication: Local Admin vs. API Key vs. Site Manager
Confirm Remote/Cloud access was disabled and that you are pointing to the correct console hostname/IP and port (443 for UniFi OS, 11443 for UniFi OS Server, or 8443 for older self-hosted software). Also verify the role has sufficient permissions; some integrations fail silently if given View Only.
Ubiquiti has not announced such a change; current MFA enforcement applies to UI.com accounts. Vendors continue to recommend local accounts for automation.
After July 22, 2024, UI.com automatically enforces a verification method (email if nothing else). Local accounts are the reliable path for nonâinteractive API use.
No; you can create a username without email, which is common for service accounts used by Home Assistant and other integrations.
UniFi OS consoles expose the Network Application over HTTPS 443, older consoles and standalone software controllers use 8443, and UniFi OS Server uses port 11443.
If the integration still uses a UI.com email, switch it to the new local account. Community threads show 401 errors immediately after MFA enablement until a local admin was used.
Yes. The latest releases of our captive portal solutions and UniFi Device Search Tool support authentication using a Network Application API Key (direct connection to a UniFi OS console) or a Site Manager API Key (connection via unifi.ui.com). See our companion guide on UniFi API authentication methods for details on when each method is appropriate.
It depends on your network setup. Local admin credentials remain the most broadly compatible option and work with all console types including the legacy self-hosted Network Application. API keys are simpler (no password rotation needed) and the Site Manager method solves connectivity challenges like CGNAT or dynamic IPs. Our companion guide covers the trade-offs in detail.
Posted on: July 17th, 2025
By: Erik Slooff
On: UniFi
API
MFA
UniFi
About the author
Erik Slooff
Owner & Lead Developer
For more than 10 years Iâve specialised in UniFiÂź guest-WiFi solutionsâranging from email-capture and SMS phone-number verification to Azure Entra ID single-sign-on and multi-site analytics dashboards. Posting as @slooffmaster in the Ubiquiti Community, Iâve contributed 160 + posts, 8300 + replies and 300 + accepted solutions that help network admins worldwide. Today our solutions secure and provide analytics for 2500 + UniFi networks across retail, hospitality, government and education in 70 + countries. Customers use our solutions to authenticate users, meet regional privacy requirements (GDPR, CCPA, etc.) and unlock marketing or loyalty insights, and more. When Iâm not refining captive-portal flows, youâll find me benchmarking new UniFi firmware or contributing to our open-source code on GitHub.
Copyright © 2026 Art of WiFi B.V.