Power BI: What to do if access to the resource is forbidden?
When using the Piano Analytics API to integrate with Power BI, you may encounter an error indicating that “Access to the resource is forbidden.” This typically points to an authentication issue.

Common causes include:
An expired or deleted API key
Incorrect credentials saved in Power BI
An API key that does not have access to the required site/organization
Cached credentials from a different key or organization that are being reused by Power BI
To resolve this problem, review and update your identification information in Power BI.
Update or reset credentials in Power BI
Open Power BI and go to: File → Options and settings → Data source settings
In Data source settings, locate the problematic data source (the one pointing to your Piano Analytics API URL).
Select it, then click Edit Permissions.
Update the credentials:
Use Basic authentication.
Enter your Access Key as the username.
Enter your Secret Key as the password.
If your current keys are obsolete (expired/deleted), this update is necessary.


If updating credentials doesn’t work
In Edit Permissions, choose Clear Permissions to remove cached credentials, then re-enter the correct Access/Secret keys.
If you cannot recover the keys or prefer to start from scratch, select the data source and click Delete, then create a new connection.
Verify the API key and key scope
If Power BI still returns “forbidden,” confirm that:
The API key is still active (not deleted).
The key is associated with the correct organization and has access to the site you are querying.
You are using the correct Access Key / Secret Key pair.
If needed, generate a new API key in your Piano Analytics profile under the API Keys section. Save the Secret Key immediately—it is only displayed once.
Check the API URL and query constraints
A “forbidden” error is usually credentials-related, but it can be triggered by a misconfigured request in some cases. If the issue appears after editing the query:
Rebuild the request in Power BI Query Editor and copy the API URL exactly, without manual alterations.
Ensure your request stays within common paging/format limits used in Power BI exports (for example, avoid overly large pages and overly complex URLs).
Handling temporary API throttling
If you are making many requests (for example, multiple refreshes or many queries at once), the API enforces concurrency limits:
Up to 20 concurrent calls per organization
Up to 5 concurrent calls per user
When limits are reached, retry the request after a short delay and reduce concurrent refresh activity if possible.