Hi @Monalisa,
Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer. They can only accept answers by others, Summarized and posted the solution that you shared, request you to Accept the answer, it will benefit the community find the answers quickly.
Scenario:
The kusto query script is invalid.
Issue:
TenantId 'xxxxxxxxxxxxxx' contains more than one active subscription. First one will be selected for further use. To select another subscription, use Set-AzContext. To override which subscription, Connect-AzAccount selects by default, use Update-AzConfig -DefaultSubscriptionForLogin 00000000-0000-0000-0000-000000000000.
Things Tried:
Running the Kusto query independently in the Azure Resource Graph confirmed that it is returning the expected results
Shared by @Monalisa
Resolution: Since the warning indicates multiple subscriptions, explicitly set the correct subscription context using the Set-AzContext command. This ensures that the right subscription is used for the query execution.