Why are there two TenantId's returned for an ADFPipelineRun log analytics query?

louw grobler 1 Reputation point
2024-09-26T15:46:02.82+00:00

I am getting duplicate results in my log analytics queries on the ADFPipelineRun table, except for the TenantId column, which has two results instead of one. The __ResourceId's are identical for both rows. I can filter on one of the TenantIds, but why are there two when it used to be just one?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,722 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 16,005 Reputation points Microsoft Vendor
    2024-09-27T19:02:08.32+00:00

    Hi @louw grobler

    Greetings & Welcome to Microsoft Q&A forum! Thanks for posting your query! 
    The reason you are seeing two TenantIds in your ADFPipelineRun log analytics query is because there are two different types of tenants in Azure Active Directory (AAD): the Home tenant and the Guest tenant.

    When a user is invited to a different AAD tenant as a guest, they are assigned a Guest tenant ID in addition to their Home tenant ID. This allows them to access resources in the Guest tenant while still maintaining their Home tenant identity.

    In the context of Azure Data Factory, if a user runs a pipeline in a different AAD tenant as a guest, the pipeline run will have two TenantIds associated with it: the Home tenant ID of the user and the Guest tenant ID of the AAD tenant where the pipeline was run.

    This is why you are seeing two TenantIds in your log analytics query. You can filter on one of the TenantIds to get the results you need.

    I hope this helps! Let me know if you have any further questions.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.