FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Are inter-tenant operations allowed ?

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    2
    3
    387
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      francis.ducharme
      last edited by

      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.

      F 1 Reply Last reply Reply Quote 1
      • F
        francis.ducharme @francis.ducharme
        last edited by

        @francis-ducharme

        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.

        danD 1 Reply Last reply Reply Quote 0
        • danD
          dan @francis.ducharme
          last edited by

          @francis-ducharme Glad you figured it out, and thanks for sharing.

          --
          FusionAuth - Auth for devs, built by devs.
          https://fusionauth.io

          1 Reply Last reply Reply Quote 0
          • First post
            Last post