Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Does anyone know if there is a way to set the new domain feature via the API?
I have more than 1300 workspaces to set and doing that by hand is not really an option.
I've seen that the domain info of a workspace is returned in the Metadata scanning in the API but I've not seen anything in the API documentation on setting the domain of a workspace.
Hello,
Any news here? Does anyone know if there's any way to automate domains related tasks (e.g. automatically create domains, automatically assign workspaces to domains, etc)?
Thanks.
Where do you find domain info from the scan? I can't find anything 😞
https://learn.microsoft.com/en-us/rest/api/power-bi/admin/workspace-info-post-workspace-info
I run the metadata scan with all argumets set to true and the domain id is then included in that result set.
Not sure which one of them adds it or it's part of the default execution I at least get it from this call.
Example URL:
Note that this will only get you the domain id of the workspaces that a domain has been set for. It does not allow you to set the domain. I've still not found an API way to do that. I ended up writing a bot to do it via the UI so that I could set the domain on all my orginizations workspaces.
Well, this is a bit wierd... I do the same thing. When I get to the step where I expand the column with the scan records, I only get these columns:
BUT - if I after the expansion manually add "domainId", I do in fact get the domains!
I guess my next question is: "How do I get the domain names"?
That's a bit of manual work.
Go to the domain settings in the admin portal, there you'll have a list of all the domains by name.
Click a domain and the settings for that domain will open up, the url will be something like this https://app.powerbi.com/admin-portal/domains/{GUID}?experience=power-bi
You then have the Name of the domain as well as it's GUID in the URL, the GUID is the domain id in the metadata scan.
Would you mind pointing to documentation about this new feature?
No wonder they kept quiet about that. Rather intriguing choice of wording.
Keep monitoring this page Available Features - REST API (Power BI Power BI REST APIs) | Microsoft Learn - they often update the content when new calls are made available.