Are inter-tenant operations allowed ?
-
Hi there,
I designed an Azure Function that allows for user creation/registration. The function demands that an email address and a FusionAuth application ID be provided, looks up if the user (email) already exists as registered for that application, then creates it if not.
Problem is that the Azure Function in question talks to FusionAuth with a specific tenant ID, application ID, client secret, client ID, etc.
It thus cannot go peer into another tenant's data (users). If I try to create a user by providing a FusionAuth application ID that's not within the configured tenant of the Azure Function, FusionAuth says the application ID does not exist.
Is there a way to do operations with the API across all tenants configured in our FusionAuth instance ?
Thanks.
-
Well, this one was simple. By scoping the API request to the target tenant I was able to do it.
if (tenantId != "") client.DefaultRequestHeaders.Add("X-FusionAuth-TenantId", tenantId);
Added this in the function in question.
-
@francis-ducharme Glad you figured it out, and thanks for sharing.