Forum Discussion

jasonyeung87's avatar
jasonyeung87
Icon for Helper V rankHelper V
1 year ago
Solved

Accessing data from 2 different tenants in graph API yields the same data.

Hi,   I'm trying to create a Power BI report that displays what Microsoft 365 licenses I have for my company's tenants. (we have 4 separate tenants). I'm following the link below: 2 Create Paramet...
  • v-saisrao-msft's avatar
    1 year ago

    Hi jasonyeung87, 

    Thank you for reaching out to the Microsoft Fabric Forum Community.

     

    The issue you're facing with both queries returning data from the same tenant is usually due to token reuse or shared query logic within Power BI. Even though you've defined separate credentials for each tenant, Power BI might be reusing the same access token or cached query steps, causing both queries to execute within the context of a single tenant. 

    Instead of using shared queries or functions and swapping parameters, create completely separate queries for each tenant. Each query should independently handle its authentication and data retrieval process without referencing any common steps. This ensures the correct access token is used and each query operates strictly within its intended tenant’s context.

     

    If this post helps, please give us ‘Kudos’ and consider accepting it as a solution to help other members find it more quickly.

     

    Thank you.