I want to assign roles to users that are known beforehand, so they have the appropriate permissions when they sign up. I thought I could pre-create the Auth Users via the Admin API without linking a provider and, if a user exists, they would be linked automatically on signin because the email matches.
This did not work, either Firebase creates another user with the same email and another UID or complains that a provider is linked, even though there is none.
I already thought about implementing a custom token to convert the active directory login token and newly generated firebase user to match the existing user.
I have the users' claims data in firestore. I would, if possible, like to keep the users ID, which makes it difficult to just update the claims on the new Auth Object.