Kariem
Kariem

Reputation: 4913

Disable many users at once

We are using Firebase Authentication in a multitenant setup. Under certain circumstances, we want to disable all users for one tenant (trial ended, subscription not renewed ...) or enable all previously disabled users. We send an UpdateRequest for every user that has to be enabled/disabled.

Although we send the requests sequentially (only one at a time per tenant and not many tenants are disabled at the same time), we have encountered a quota exceeded error several times:

{
    "error": {
        "errors": [
            {
                "domain": "global",
                "reason": "invalid",
                "message": "QUOTA_EXCEEDED : Exceeded quota for updating account information."
            }
        ],
        "code": 400,
        "message": "QUOTA_EXCEEDED : Exceeded quota for updating account information."
    }
}

Is there a way to do a batch update for multiple users using the Admin SDK? We are currently using it from Java, but NodeJS would also work for us. Alternatively, it would be interesting to know, if there is another way to disable multiple users, e.g. with an expression filter on user properties.

Upvotes: 5

Views: 905

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317968

There are no bulk operations for updating users with the Firebase Admin SDK. Please feel free to file a feature request describing your use case for that.

Upvotes: 3

Related Questions