Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Charline_74
Helper III
Helper III

API to change the name of a workspace

I have to use this API (https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-update-group-as-admin) but I have an error.
Here is my script:

 

Connect-PowerBIServiceAccount

$body = @{
    updateDetails = @(
        @{
            name = "WKS - [DEV] Delivery"
            description = "Test"
        }
    )
}

Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/admin/groups/f8cdcb07-13bd-4955-b15f-fc3bc5532211" -Method Patch -Body $body

 

 

Can someone help me ? 

 

Thanks In Advance, 

 

Charline

3 REPLIES 3
lbendlin
Super User
Super User

DANGER DANGER DANGER.  Changing the name of a workspace is a Very Bad Idea for multiple reasons.

 

Anyway - the error may be caused by the fact that another workspace with the same name already exists.

 

What's the error message?

Here is the error message :

 

Invoke-PowerBIRestMethod : Une ou plusieurs erreurs se sont produites.
Au caractère Ligne:12 : 1
+ Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/adm ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (Microsoft.Power...werBIRestMethod:InvokePowerBIRestMethod) [Invoke-PowerBIRestMethod], AggregateException
    + FullyQualifiedErrorId : Une ou plusieurs erreurs se sont produites.,Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod

Yeah, that is not very helpful. I assume you have a Pro license - you can consider raising a Pro ticket at https://powerbi.microsoft.com/en-us/support/pro/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.