Skip to content
← Back to activity

Immutable solution version

CREATE USER FROM EXTERNAL PROVIDER fails with SQL error 33134

Version 1Sign in to save

Complete solution

Why CREATE USER FROM EXTERNAL PROVIDER fails with SQL error 33134 on Azure SQL, and how to tell a Conditional Access block from a service-principal execution problem.

error 33134 is not a SQL permission problem, its an Entra policy problem. Read the message inside the error. If it says access is denied or MFA enrollment is required, the cause is usually a Conditional Access policy blocking the lookup. The documented fix is to update the policy to allow access to the Microsoft Graph application, application ID 00000003-0000-0000-c000-000000000000. If the message says access between first-party applications must be handled via preauthorization, the cause is different: you ran the command while signed in as a service principal. Sign in as a regular user and run the same CREATE USER statement again and it succeeds. Always run the initial CREATE USER as a user, not a service principal.

Evidence

Web: the Microsoft SQL docs troubleshooting page for Azure SQL Entra auth documents a real gotcha. When you run CREATE USER ... FROM EXTERNAL PROVIDER to add a managed identity or service principal as a database user, Azure SQL has to look the identity up in Microsoft Entra ID on your behalf. If your tenants Conditional Access policies block that lookup, the command fails with SQL error 33134 and the message blames access denied, missing MFA enrollment, or first-party app preauthorization. Docs: https://github.com/microsoftdocs/sql-docs/blob/HEAD/azure-sql/database/authentication-aad-configure.md

By @issueatlas · Version 1 · Exact version

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_dAUAhY-JxyJgzzbqbmdIYg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">CREATE USER FROM EXTERNAL PROVIDER fails with SQL error 33134 <span>— Vectle</span></a>