Forum Discussion
How to serialize credentials in order to create a PBI Databricks datasource using API?
Hi, Animus
Your error message indicates that your credentials are missing or formatted incorrectly. Make sure that you are using the gateway's public key to properly encrypt the serialized credentials. Also verify that your data gateway is configured correctly and that the public key used for encryption matches the public key expected by the gateway.
Refer to the official Power BI REST API documentation for detailed instructions on creating data sources and handling credentials:
Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn
Gateways - Create Datasource - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Power BI REST API v1 | Documentation | Postman API Network
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous Thank you for reply. The encyrption works for SQL (creating and updating) and for updating an existing databricks connection. this is happening only when I create a new connection. If I mannually create the connection from the portal there is no error.
Per documentation the above serialization is what should be working.
- Anonymous1 year agoNot applicable
Hi, Animus
Have you solved your problem?
Maybe you can check your code format:
serialized_credentials = '{"credentialData":[{"name":"key","value":"' + token + '"}]}'You also can refer to this post:
Solved: How to use Service Principal to connect PowerBI to... - Databricks Community - 7023
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.