Forum Discussion
How to switch Azure tenant/directory for Azure Resource Graph data connector?
Hello,
I am trying to evaluate FinOps hub toolkit and have issues connecting PowerBI reports to the FinOps hub and getting reasonable reports from it. When trying to open Governance report, I have noticed that Azure Resource Graph data source logs into different tenant than FinOps hub resource is deployed. As a result I get an empty Management Group dataset due to my account in tenant PowerBI is connected to does not have permissions to read those. I can succesfully run same query in Azure portal Resource Graph explorer when right tenant is selected and get expected results.
Also it does not make sense to read management groups from that tenant because FinOps hub is deployed in different scope. FinOps hub data access is done via storage SAS token and explicit URL so finops data exports are accessed as expected.
In Azure portal I can click my user in the top right corner and select Switch directory to select right tenant. I am using same domain login for both tenants so option to login different tenant account is not applicable. How to do that in Power BI and make Azure Resource Graph select rigth data? I have tried to supply an explicit Root Management Group ID to a query, but obviously that fails.
Update: This does not work: https://learn.microsoft.com/en-us/power-bi/enterprise/service-admin-azure-ad-b2b#tenant-switcher
If I go to PowerBI online service and select account in PowerBI service, I cannot switch. Tenant selection becomes greyed out, when trying to select.
3 Replies
- grazitti_sapna
Super User
Hi Elvinas,
It seems that Power BI is swtiching tanent and logging with another tanent credentials, you can double check the and correct the same by following below steps:-
If you're using Power BI Desktop, try these steps to force authentication into the correct tenant:
- Open Power BI Desktop.
- Go to "File" > "Options and settings" > "Data source settings".
- Look for Azure Resource Graph and select it.
- Click "Edit permissions" and then "Clear permissions".
- Reauthenticate using the correct tenant account when prompted.
- Try reconnecting to the FinOps Hub data source.
If you're using Power BI Service (Online), follow these steps:
- Open your dataset in Power BI Service.
- Go to "Settings" > "Datasets" > Select your dataset.
- Under Data source credentials, click "Edit credentials".
- Choose OAuth and select the correct tenant account.
Set Tenant ID in Azure Resource Graph Queries (Advanced Option)
You can explicitly specify the tenant ID in your Resource Graph queries by modifying the connection string. In Power BI’s Advanced Editor, check if there’s an option to provide the correct tenant ID manually.
Switch Tenant in Azure Portal and Restart Power BI
- Go to Azure Portal.
- Click your user profile (top right).
- Switch to the correct tenant.
- Close and restart Power BI and try reconnecting.
Since you mentioned that tenant switching is greyed out, your organization might have enforced tenant restrictions via Azure AD policies. You may need to check with your Azure AD administrator to see if they have restricted Power BI from switching tenants.
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together! - ElvinasNew Member
Hello,
thanks for suggestion.
> If you're using Power BI Desktop, try these steps to force authentication into the correct tenant:
Yes, I am using powerBI Desktop app.
- Reauthenticate using the correct tenant account when prompted.
- both tenanst are using SAME account name (corporate email) so it is correct for both tenants.
- I have tried to logout from Azure portal and login again. After selecting intended tenant in Portal and soing signoff/signin, I am presented with Azure login prompt where I use my corporate email account, then I do get Authenticator MFA prompt in phone and then logged in to intended tenant.
- PowerBI datasource presents Office 365 login prompt and I do not get any MFA prompts it just signs in as an SSO. It seems Azure Resource Graph data source authentication is linked to corporate Windows/Office environment and not does Azure login.
- Try reconnecting to the FinOps Hub data source.
- There are no isues connecting to FinOps Hub data source as connection to Storage account is done via access URL and SAS combination.
- There are no isues connecting to FinOps Hub data source as connection to Storage account is done via access URL and SAS combination.
Not sure how Azure Resource Graph does login but if it is linked to Office 365 then it makes sense that things does not work. That development tenant has nothing to do with our Office 365 corporate tenant and obviously it does not office or any premium Entra ID features enabled.
So it seems Power BI desktop app and/or Azure Resource Graph datasource is hard linked to Office 365.
Thank you
- Reauthenticate using the correct tenant account when prompted.
- v-veshwara-msft
Community Support
HI Elvinas ,
Thanks for reaching out to Microsoft Fabric Community.Just checking in to see if you're still facing the issue with Azure Resource Graph connecting to the incorrect tenant in Power BI Desktop. Based on your earlier input, it seems SSO might be defaulting the authentication to your Office 365 tenant, which doesn't align with your FinOps Hub deployment.
If you're still looking for a solution, here are a couple of additional points that may help:
-
Try launching Power BI Desktop from a separate Windows profile or clean VM to avoid cached credentials.
-
If possible, ask your Entra ID admin to review any tenant restrictions or conditional access policies that could be enforcing the default tenant selection at sign-in level.
If you found a workaround or resolved it another way, it would be helpful to share the steps for the benefit of others facing a similar scenario. Otherwise, feel free to reach out for further assistance.
If this post helps, then please consider to give a kudos and Accept as the solution to help the other members find it more quickly.
Thank you. -