Microsoft Power BI API Credential Exposure: From Public Postman Workspace to Data Exfiltration in Minutes
A municipal government agency's Microsoft Power BI service principal credentials (client ID and secret) were left in a public Postman workspace. An attacker could use them to obtain an access token, enumerate workspaces and datasets, and query live emergency dispatch and personnel records.
Published on infosecwriteups.com
You don’t need to hack a government agency when its API credentials are already public.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the service principal's client secret was stored in a public Postman collection instead of a secrets manager, and Power BI audit logging was disabled.
Impact
The exposed credentials gave access to live emergency dispatch logs and individual personnel records, and the API logged nothing because audit logging was disabled.
What the attacker needed
Public Postman workspace with credentials; valid service principal credentials; network access to Microsoft login and Power BI API
The fix
The credentials should be rotated immediately, moved to a secrets manager, and Power BI audit logging should be enabled and monitored.
How it was found
- Find a public Postman workspace containing a Power BI client ID and secret.
- Request an OAuth 2.0 access token from Microsoft's token endpoint using the credentials.
- Call the Power BI REST API to list all accessible workspaces.
- List reports and dashboards in each workspace.
- Query the underlying datasets with DAX to retrieve data.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A service principal is like a robot account that applications use to log in automatically, using an ID and a secret password. Here, that secret password was posted publicly on a website where developers share API collections, so anyone could use it to read the organisation's Power BI reports and data. The API itself worked correctly; the mistake was leaving the password where anyone could find it.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.