How to fix 0x80180018 error when adding a second account in Windows?

Prefer to fix it yourself? The manual steps follow.

  • 5methods
  • 5 minutes for you, plus the time IT needs to assign a licence
  • Easy
Start fixing

Applies to Windows 11 and Windows 10 PCs that connect a work or school (Microsoft Entra ID) account managed by Microsoft Intune or another MDM service

5 methods in this guide
  1. What the error means
  2. Causes, ranked
  3. The fixes
  4. 1. Report it to IT
  5. 2. Assign the licence
  6. 3. Check the MDM user scope
  7. 4. Add the account for apps
  8. 5. Connect again
  9. Still not working
  10. Prevent it
  11. FAQ
Question

Hi, I am attempting to add a second work account to my Windows PC, but I keep getting the 0x80180018 error. Any tips on how to get rid of it?

Error 0x80180018 appears when Windows tries to enroll your PC in an organisation's device management, usually Microsoft Intune, and the server finds the licence of your work account in a bad state. It is not a fault in Windows, so the fix sits with the organisation. Send the code to IT first; if you only need mail and Office, add the account for apps only.

Short answer

Error code 80180018 means the user licence for device management is missing or in a bad state, and Microsoft says the user will need to call the admin. Send IT the error code and the Correlation ID and ask for a licence that includes Intune (Fix 1). If you only need Outlook, Teams or OneDrive, add the account for apps only, which does not enroll the PC (Fix 4).

At a glance
ErrorSomething went wrong. There was an error with your licence, with Server error code: 80180018 (hex form 0x80180018).
Where it appearsSettings > Accounts > Access work or school > Connect, during Windows setup on a work PC, or in the Company Portal when the PC enrolls in management.
Main causeThe user has no valid Intune licence, or it is in a bad state. Microsoft's internal name for the code is MENROLL_E_USERLICENSE.
Fastest fixIT assigns an Intune or Microsoft 365 licence that includes Intune, then you connect again (Fix 1, Fix 2 and Fix 5).
Also written as0x80180018, 80180018, server error code 80180018, MDM user licence error, "There was an error with your license".
AffectsWindows 11 and Windows 10, Home and Pro, with any work or school account whose organisation turned on automatic MDM enrollment.
Vendor statusNot a bug and not fixed by an update. Microsoft documents it as a licence state that blocks enrollment and that only the admin can change.
Who can fix itThe organisation's Microsoft 365 or Intune admin. On your side you can only report it, retry, or add the account for apps only.
Time to fix5 minutes for your part. How fast the licence applies on Microsoft's side we could not confirm.

Facts checked on 15 October 2026. Steps written for Windows 11 (25H2 and 26H2) and Windows 10 22H2.

What error 0x80180018 (server error code 80180018) means

When you connect a work or school account in Windows, the organisation can make Windows also enroll the PC in its mobile device management (MDM), most often Microsoft Intune. Enrollment checks that your account holds a licence for that service. Error 0x80180018 is the answer when that check fails.

Microsoft's list of MDM registration errors names the code MENROLL_E_USERLICENSE and describes it as: "The license of user is in bad state blocking enrollment; the user will need to call the admin." The full message looks like this:

The message on screen

Something went wrong.
There was an error with your licence.
You can try to do this again or contact your system administrator with the error code 80180018.

Additional problem information:
Server error code: 80180018
Correlation ID:
Timestamp:
Server message:
Why the second account

Your first work account may belong to an organisation that does not use MDM, or to one where you hold a licence. The second account belongs to another organisation, or another tenant, whose rules ask Windows to enroll the PC, and there your account has no valid licence.

Table of Windows MDM enrollment codes 0x8018000A, 0x80180013, 0x80180014, 0x80180016, 0x80180017, 0x80180018 and 0x80180026 with their meaning and who can fix each
0x80180018 sits in a family of enrollment codes; only the licence error and a few others need the admin.

What causes error 0x80180018, from most to least common

Microsoft ties this code to one thing, the user licence. The table ranks the ways the licence ends up wrong, from the sources we read, and links each to a fix.

Causes of 0x80180018 and the fix for each
How oftenCauseFix
Most oftenThe account is in the MDM user scope, so Windows tries to enroll, but no licence with Intune is assigned to itFix 1, then Fix 2
OftenThe licence exists but is in a bad state: expired, removed, or the subscription lapsedFix 1, then Fix 2
Less oftenThe MDM user scope covers users who should never enroll, such as guests or a second tenant's accountsFix 3
Less oftenYou do not need device management at all, only mail and Office for the second accountFix 4
RarelyA half-finished earlier attempt left the account listed after IT already fixed the licenceFix 5
What does not cause it

The old advice to run the network troubleshooter or install Windows updates does not change a licence on Microsoft's servers. A slow network gives other messages; this one comes back from the server with its own code.

How to fix 0x80180018 when adding a work or school account

Fix 1 is for every reader with the error, because only the organisation can change the licence. Fixes 2 and 3 are for its admin. Fix 4 is the way around it when you only need apps, and Fix 5 finishes the job after IT has acted.

What you see or who you areStart with
A user who needs the PC managed by the organisationFix 1
The Microsoft 365 or Intune admin of the organisationFix 2, then Fix 3
You only need Outlook, Teams or OneDrive for the second accountFix 4
IT says the licence is now assigned, but the account is listed half addedFix 5
The code is 8018000a, 80180013 or 80180016, not 80180018FAQ below

Fix 1. Send the error to IT and ask for a licence that includes Intune

5 minutesNo riskEvery user who sees 80180018 and needs the PC enrolled in the organisation's management.

Microsoft's own description says the user will need to call the admin. The Correlation ID and Timestamp let IT find your failed attempt in their logs instead of guessing.

  1. Leave the error window open and look under Additional problem information.
  2. Write down or take a screenshot of Server error code, Correlation ID and Timestamp.
  3. Note which account you were adding, and whether the PC is yours or the organisation's.
  4. Send these details to the organisation's IT or help desk, and say the message is "There was an error with your licence".
  5. Ask them to check that your account has a licence that includes Microsoft Intune, and that it is active.
  6. Wait for their reply before you connect again, then follow Fix 5.
A short message for IT

"Adding my work account in Windows fails with server error code 80180018 (MENROLL_E_USERLICENSE). Correlation ID and time attached. Can you check my Intune licence and the MDM user scope?"

It worked if: IT confirms a licence with Intune is assigned to your account, and the next connection finishes without the message.

If not: If IT says the licence is fine and the error stays, ask them to check the MDM user scope in Fix 3, or use Fix 4 if apps are enough.

Fix 2. Assign an Intune or Microsoft 365 licence to the user (admins)

10 minutesLow riskYou are the admin of the organisation that owns the work account in the error.

The code is raised by the enrollment service when the user's licence is missing or in a bad state. Microsoft's enrollment troubleshooting tells admins to assign either an Intune or a Microsoft 365 licence to the user.

  1. Sign in to the Microsoft 365 admin center at https://admin.microsoft.com with an admin account.
  2. Find the user whose account shows the error and open their licences.
  3. Check that a licence is assigned which includes Microsoft Intune, for example Intune itself or a Microsoft 365 plan that bundles it.
  4. If the licence is there but its subscription expired or was cancelled, renew it or assign another one.
  5. Save, then ask the user to retry with Fix 5.
Paid licence

A licence costs money per user. If the second account belongs to a person who does not need a managed PC, Fix 3 or Fix 4 may suit the organisation better than buying one.

It worked if: The user's licence list shows a plan with Intune as active, and their next connection enrolls the PC without the code.

If not: If the user is licensed and still gets 80180018, check who is in the MDM user scope with Fix 3.

Fix 3. Match the MDM user scope to the users who hold a licence (admins)

10 minutesLow riskYou are the admin, and users without a licence, or a second tenant's accounts, hit the error.

The MDM user scope decides whose devices Windows enrolls automatically when they add a work account. If it says All while only some users hold a licence, every unlicensed user who adds the account gets the licence error.

  1. Sign in to the Azure portal at https://portal.azure.com and select Microsoft Entra ID.
  2. Select Mobility (MDM and MAM), then Microsoft Intune.
  3. Look at MDM user scope: None, Some or All.
  4. If it is All, either license every user who may add a work account, or switch to Some and pick a group of licensed users.
  5. While you are there, check that MDM terms of use URL is https://portal.manage.microsoft.com/TermsofUse.aspx; Restore default MDM URLs resets it.
  6. Select Save.
Scope changes reach everyone

Setting the scope to None stops automatic enrollment for the whole organisation, not only for one user. Change it to a group rather than to None, and tell your users before you do.

It worked if: Users outside the scope connect their work account with no enrollment attempt, and users inside it hold a licence and enroll normally.

If not: If a licensed user in scope still gets the code, open a support request with Microsoft and attach the user's Correlation ID and Timestamp.

Fix 4. Add the second work account for apps only, without enrolling the PC

5 minutesLow riskYou only need Outlook, Teams, OneDrive or Office files for the second account, not a managed PC.

The licence check runs during device enrollment. An account added for apps signs in to the apps but does not ask Windows to enroll the PC, so the enrollment licence check does not apply.

  1. Press Win + I and open Accounts > Email & accounts.
  2. Under Accounts used by email, calendar, and contacts or Accounts used by other apps, select Add a work or school account.
  3. Sign in with the second work account and its password.
  4. If an Office app asks whether to let the organisation manage the device, clear Allow my organization to manage my device and choose to sign in to this app only.
  5. Open Outlook, Teams or OneDrive and check that the second account works there.
Decision chart for error 0x80180018: a user who needs a managed device starts with Fix 1, a user who only needs mail and Office uses Fix 4, an admin uses Fix 2 and Fix 3
Who you are and what you need decide the fix; nothing on the PC changes the licence itself.

It worked if: The second account appears under Email & accounts and signs in to its apps, with no 80180018 message.

If not: If the organisation requires a managed device for its mail or files, apps will refuse to open its data: go back to Fix 1.

Fix 5. Disconnect the half-added account and connect it again

10 minutesLow riskIT confirmed the licence, but the account sits half added under Access work or school.

A failed attempt can leave the account listed without a finished enrollment. Removing it and starting again makes Windows run the licence check again against the new licence.

  1. Make sure the PC is online, step by step: How to check your internet connection in Windows.
  2. Open Access work or school. The shortcut works on Windows 11 and Windows 10:
    ms-settings:workplace
  3. If the second account is listed from the failed attempt, select it and choose Disconnect, then Yes. Leave your first work account alone.
  4. Restart the PC.
  5. Open Access work or school again and select Connect (on Windows 11, Connect next to Add a work or school account).
  6. Sign in with the second account and follow the prompts.
Windows 10 Settings, Accounts, Access work or school page with the Connect button and the Export your management log files link
Windows 10 shown; Windows 11 has the same Access work or school page with a Connect button for a new account.

It worked if: The connection finishes, the account shows under Access work or school, and Settings says some settings are managed by your organisation.

If not: If 80180018 comes back, the licence is still not active for the account: send IT the new Correlation ID from the message.

Still getting 0x80180018: what to collect and who to ask

Because the code comes from the organisation's licence, the useful next step is better details for IT, not more repairs on the PC. Collect these:

  • The Correlation ID and Timestamp from the newest error message, not an old one.
  • The management report: in Access work or school, select Export your management log files and send the saved report to IT.
  • Your Windows edition and version from winver, such as Windows 11 Pro 25H2.
  • Which account you add, and which work accounts are already connected on the PC.
  • Whether the error shows in Settings, during Windows setup, or in the Company Portal.
When it is not your PC at all

The PC's hardware, drivers and Windows files play no part in this code. A new user account, a reset or a reinstall gives the same error until the licence is fixed. Windows 10 left support on 14 October 2025, which does not change this error but limits fixes for others.

How to avoid the licence error with work accounts

  • Before you add a second work account, ask whether that organisation manages devices and whether you hold its licence.
  • If you only need its mail and files, add it for apps only (Fix 4) instead of under Access work or school.
  • Admins: keep the MDM user scope on a group of licensed users, not All.
  • Admins: when a subscription ends or a user changes plans, check that the Intune part stays assigned.
  • Keep the PC's clock right with How to fix the date and time in Windows, so a renewal does not fail with the related 0x80180016.

A managed PC answers to the organisation that enrolled it. On your own PC, think twice before you let a second organisation manage it, because its policies then decide parts of your settings.

Frequently asked questions

What does error code 80180018 mean?

It means the licence of your work or school account is missing or in a bad state, so the organisation's device management refused to enroll the PC. Microsoft lists the code as MENROLL_E_USERLICENSE and says the user will need to call the admin. The text on screen is "There was an error with your licence" with Server error code 80180018. It is the same error as 0x80180018; Windows only drops the 0x in front.

Why do I get 0x80180018 only when adding a second work account?

Because the second account belongs to an organisation, or a tenant, with different rules. Your first account may come from a place that does not use device management, or from one where you hold a licence. When you add the second one, its organisation asks Windows to enroll the PC, and the enrollment service finds no valid licence for you. The PC itself is fine. Ask that second organisation's IT, or add the account for apps only.

Can I fix error 80180018 myself without IT?

You cannot assign yourself a licence, so the error itself needs the admin. What you can do alone is add the account for apps only under Email & accounts, which signs in Outlook, Teams and OneDrive without enrolling the PC. That works when the organisation lets unmanaged devices open its data. If its apps then refuse your files or mail, a managed PC is required and only IT can give you the licence.

Will a network reset, Windows Update or SFC fix 0x80180018?

No. Those repairs change the PC, while this code is the server's answer about your licence. The old advice on many pages, including the earlier version of this one, listed the network troubleshooter and updates, but nothing in Microsoft's description of the code points to the PC. Keep Windows updated for its own sake, then spend your time on Fix 1 instead.

Which licence does the account need to stop the error?

A licence that includes Microsoft Intune. Microsoft's enrollment troubleshooting tells admins to assign either an Intune or a Microsoft 365 licence to the user, which in practice means a Microsoft 365 plan that bundles Intune. Some organisations get Intune through Enterprise Mobility + Security. Ask your IT which plan they use; the plan names and prices change, and only the admin sees which ones the organisation owns.

I got server error code 80180018 during Windows setup. What now?

The same licence check runs when a new or reset PC joins an organisation during setup, so the cause and the fix are the same. On a PC your employer gave you, send IT the Correlation ID from the screen and wait for the licence. On your own PC that you do not want managed, go back in setup and set it up for personal use, then add the work account for apps only later.

Is 0x80180018 the same as 8018000a, 80180013 or 80180014?

No, they are different codes from the same family. Microsoft lists 0x8018000A as: the device is already enrolled. Another user's work account often did that. Code 0x80180013 means the user has enrolled too many devices and can remove old ones. Code 0x80180014 means the platform or Windows version is not supported by the organisation. Code 0x80180016 is a rejected renewal, where Microsoft says to check the time on the device.

What is error 8018?

8018 is the start of the codes Windows uses for MDM enrollment, the step where an organisation takes over management of a PC. The full code always has eight digits, such as 80180018 for the licence error, 8018000a for an already enrolled device or 80180014 for an unsupported version. Look at the last digits on your screen and compare them with the table in the meaning section of this page.

Co to je za chybu, qual erro, kenapa ya, jak naprawić ten błąd: what is this error in plain words?

This page is in English. In plain words: the organisation behind the work or school account you tried to add has not given that account a valid licence for managing devices. Windows asked to join the organisation's management, and the organisation's server said no. You cannot fix it on the PC. Send the error code 80180018 to the organisation's IT, or add the account only for Outlook, Teams and OneDrive.

Does 0x80180018 mean my PC has a problem or malware?

No. The code comes from the organisation's management server as an answer about the licence on your account. It says nothing about the health of Windows, your drivers or your files. A new Windows user account, a reset or a fresh install will show the same message until IT fixes the licence. If your PC shows other errors as well, treat them separately.

Sources

  1. Microsoft Learn: MDM registration constants (MENROLL_E_USERLICENSE 0x80180018 and the other 0x8018 codes) (learn.microsoft.com)
  2. Microsoft Learn: Troubleshooting Windows device enrollment problems in Intune (licence, MDM user scope, terms of use URL) (learn.microsoft.com)
  3. HTMD Blog: Intune Fix MDM User License Error Code 0X80180018 (the full message and its problem information) (anoopcnair.com)

Did this fix work?

One click, no account. It tells the next reader which guides are worth their time.

We show the result once 20 readers have answered.
Still broken? Describe your case with the exact error text.

Questions and experiences: fix 0x80180018 error when adding a second account in Windows

Still broken, or found a fix we did not cover? Ask here: members and our editors answer. Reading is open; writing needs a free account.

0 comments

…

4,322 members already hereThey read, write, comment and vote. 0 verified · 31 joined this year