Skip to content

Firebase Auth errorFirebase: “This operation is restricted to administrators only” (auth/admin-restricted-operation)

Sign-up, anonymous sign-in or account deletion from the app fails with auth/admin-restricted-operation, or ERROR_ADMIN_RESTRICTED_OPERATION on Android and iOS. The project is set so that only an administrator can create or delete accounts, and the app tried to do it as an end user.

Short answer

In the Firebase console, open Authentication, Settings, and look for the user actions options (create and delete) to see whether they are turned off. Turn them back on if users should sign up themselves. If accounts are meant to be created by an admin only, keep it off, create users with the Admin SDK on your server, and show a clear message in the app.

Why Firebase blocks the user, and the fix

  1. 01

    User actions are turned off in the project

    “In these cases, you can disable user actions from the Firebase Authentication Settings page, which prevents account creation and deletion by end-users.” Firebase, Users in Firebase projects (User self-service)

    Firebase Authentication can block end users from creating and deleting accounts. Then every client-side sign-up returns this error, and anonymous sign-in, which creates an account too, can be blocked as well.

  2. 02

    Accounts are meant to be created by an admin

    “You should gracefully handle the error on your front-end by asking the user to take the appropriate actions for your service.” Firebase, Users in Firebase projects (User self-service)

    For invite-only or staff apps, keep self sign-up off. Create the user on your server with the Admin SDK, then let them sign in or set a password through a reset link. generatePasswordResetLink only returns the link; you send it to the user yourself.

    // server, Admin SDK
    await getAuth().createUser({ email, password, displayName });
    const link = await getAuth().generatePasswordResetLink(email);
  3. 03

    Only anonymous sign-in fails

    Developers also report this code from signInAnonymously when the Anonymous provider is off. If only anonymous sign-in fails, open Authentication, Sign-in method and check that Anonymous is enabled.

  4. 04

    Multi-tenant projects

    With multi-tenancy, the setting is per tenant and is changed through the API, so a tenant can block sign-up even when the project setting allows it. Check the tenant the app signs in to.

  5. 05

    Reading the message in your app

    “This operation is restricted to administrators only.” GitHub, firebase-js-sdk auth error messages

    The web SDK shows the code with a short message. Catch it and explain what the user can do, for example ask for an invite, instead of showing the raw error.

Checked against the vendor’s docs on : Firebase docs: Users in Firebase projects; Firebase docs: Admin Authentication API errors; firebase-js-sdk: auth error messages.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: Firebase auth/operation-not-allowed · Firebase auth/email-already-in-use · Firebase auth/requires-recent-login · Firebase “FIS_AUTH_ERROR”

Questions

More on this error

How is this different from auth/operation-not-allowed?

operation-not-allowed usually means the sign-in provider is off. admin-restricted-operation means end users may not create or delete accounts, though for anonymous sign-in a disabled Anonymous provider can show this code too.

Why does anonymous sign-in fail with this?

Anonymous sign-in creates a new account, so turning off user sign-up can block it. Also check that the Anonymous provider is enabled under Sign-in method.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.