Handling API Authentication Issues

Q: What should users do when encountering credential type errors while connecting to data exports in Power BI?

A: If a user is trying to perform a data export to Power BI and receives an error like “We were unable to connect because this credential type isn’t supported for this resource”, the solution is to configure the connection to use Basic authentication, which requires a combination of username and password. Ensure that the API key is being used correctly in accordance with the authentication method expected by Power BI.

Q: What should I do if a user receives an “Unauthorized” error when trying to use the API with Python or Google Script?

A: If a user encounters a {"errorCode":"401","message":"Unauthorized"} response, here are some steps to troubleshoot and resolve the issue:

  1. Share the Code: Share the script you’re using with our support team so they can review any potential issues. Ensure that you’re replacing the credentials, API keys, and report IDs appropriately within the code.
  2. Check the Certificate Authority: For Python or R users, verify that the certificate authority is recognized in their trust store. Otherwise, authentication may fail due to certificate issues.
  3. Use Python-certifi-win32: By installing python-certifi-win32, Python’s requests module should be able to utilize the Windows certificate store, which may resolve any certificate-related authentication problems.
  4. Inspect User Permissions and Passwords: Ensure that the user has the correct permissions for data export functionality. Also, check for special characters in the user’s password that may need proper handling in the code.
  5. API Password Reset: As a last step, try resetting the API password for the user. Often, this can rectify authentication problems and restore access.

If after these steps, the issue remains unresolved, please continue to work with the support team for further diagnosis and assistance. Helpful documentation includes: