Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am implementing a provisioning tool using the PowerBI.CSharp.SDK, authenticating to PowerBI using a service principal.
The code is based on the AppOwnsData code sample for authentication.
I can successfully create a new workspace, import a PBIX, and modify the datasource and credentials to point to a specific Azure SQL database.
I need to assign the new workspace to a PowerBI Embedded capacity. I can do this in the powerbi portal, but my code returns "unauthorized" despite the service principal having:
The code looks like this, and I have verified that the workspace id and capacity id are valid.
Fails on the last line with Unauthorised response from the REST API.
Can anyone spot what am I doing wrong?
Hi, @Anonymous
It seems there is something wrong with authorization from the rest api. I can't reproduce your scenario, I'd like to suggest you open a support ticket here if you have a pro license for further help.
Best Regards
Allan
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 |
User | Count |
---|---|
8 | |
6 | |
4 | |
4 | |
4 |