How to Fix Power BI Clarity API Authorization Header Errors
Question details
Users encounter errors when Power BI rejects a Bearer token sent in a custom Authorization header to connect to the Clarity API.

- Product
- Power BI
- Device & OS
- not provided
- Scenario
- Connecting Power BI to the Clarity API using a custom Bearer token.
- Observed behavior
- Power BI rejects the custom Authorization header, resulting in a connection failure.
Ensure you have the correct Clarity API URL and your Bearer API token ready before configuring the data source settings in Power BI.
Configure Anonymous Authentication for the Clarity API
Power BI requires the data source to use Anonymous authentication to allow custom Authorization headers.
Power BI restricts the use of custom Authorization headers when standard authentication methods (like Windows or Basic) are selected. To successfully pass a custom Bearer token to the Clarity API, the connection's authentication method must be explicitly set to Anonymous.
In Power BI Desktop, navigate to the Home tab and click on Data source settings.
Find and select the Clarity API URL from your list of data sources, then click on Edit Permissions.
Under the Credentials section, click Edit, change the authentication method to Anonymous, and click Save.
Ensure your query sends the header correctly formatted as Authorization: Bearer YOUR_API_TOKEN.

Analyze and Manage Your Data with WPS Office
While Power BI handles complex API integrations, WPS Office provides a robust, lightweight, and free alternative for everyday data analysis and spreadsheet management. It is highly compatible with Microsoft Excel formats, ensuring your data workflows remain seamless.
- 1. Download WPS Office: Visit the official WPS website to download and install the free suite on your device.
- 2. Open Your Data Files: Launch WPS Spreadsheet and easily open your existing Excel or CSV data files.
- 3. Analyze and Visualize: Utilize built-in pivot tables and charts to analyze your data efficiently without complex configurations.

Frequently Asked Questions
Why does Power BI reject my Bearer token?
Power BI automatically blocks custom Authorization headers containing Bearer tokens if the data source authentication is not set to Anonymous. This is a built-in security measure to prevent credential conflicts.
How do I correctly format the Authorization header for the Clarity API?
Your query header must be formatted exactly as 'Authorization: Bearer YOUR_API_TOKEN'. Ensure there is a single space between the word 'Bearer' and your actual token string.
Can I use Windows authentication with a custom API token in Power BI?
No, you cannot mix standard authentication methods like Windows or Basic with a custom Authorization header in Power BI. You must select Anonymous authentication to use your custom token.




