The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I am connecting via a call to the API like this (ie tenantid and service principal) :
app = msal.ConfidentialClientApplication(client_id, authority=authority_url, client_credential=secret_value)
url = f'https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/refreshes?$top=1'
The above call works when I use a datasetId that I own but receives
404 Client Error: Not Found for url
when it a dataset that someone else owns
My code needs to run without me being connected. How do I resolve?
Hi @FPP ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you @jaineshp for the prompt response.
I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.
Thank you.
Hey @FPP,
The Problem: Your service principal doesn't have access to datasets owned by others.
Solution Steps:
Pro Tip: If you're hitting this often, ask for a dedicated "API workspace" where all shared datasets live and your service principal has permanent access.
Still getting 404? Double-check your workspaceId and datasetId are correct. Sometimes copying from URL gives wrong IDs.
That's it. The permissions thing trips up everyone initially - you're not alone on this one.
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer