microsoft / microsoft/powerbi-powershell
New-PowerBIWorkspace Command returns error
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 413
- Forks
- 134
- Avg merge
- 33m
- Merged PRs (30d)
- 1
Description
Hi
A resolution to problem described below would be extremely useful as this may explain why I am currently unable to utilise the CopyWorkspaceSampleScript to duplicate workspaces - as detailed in Kay Unroth's recent blog .
I am a Power BI Admin and can create workspaces in the Power BI Service on my tenant where App Workspaces are now the default Workspace mode.
I have installed the latest version of the MicrosoftPowerBIMgmt module (1.0.487)
However, on issuing the command New-PowerBIWorkspace -Name "New WS"
It returns an Internal Server Error as follows:
New-PowerBIWorkspace : Operation returned an invalid status code 'InternalServerError'
At line:1 char:1
- New-PowerBIWorkspace -Name "New WS"
-
+ CategoryInfo : WriteError: (Microsoft.Power...owerBIWorkspace:NewPowerBIWorkspace) [New-PowerBIWorkspace], HttpOperationException + FullyQualifiedErrorId : Operation returned an invalid status code 'InternalServerError',Microsoft.PowerBI.Commands.Workspaces.NewPowerBIWorkspace
On issuing the Powershell command Resolve-PowerBIError -Last, it returns:
RequestId : 4d767ec8-fe7c-41e1-8d18-0355045ceb5a
Response : Internal Server Error (500): {
"error":{
"code":"","message":"An error has occurred."
}
}
PowerBIErrorInfo :
ResponseDate : Mon, 29 Apr 2019 12:39:13 GMT
RequestMethod : POST
RequestUri : https://api.powerbi.com/v1.0/myorg/groups
InvocationInfo : {New-PowerBIWorkspace}
Line : New-PowerBIWorkspace -Name "New WS"
Position : At line:1 char:1
+ New-PowerBIWorkspace -Name "New WS"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace : at Microsoft.PowerBI.Api.V2.Groups.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Api.V2.GroupsExtensions.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Api.V2.GroupsExtensions.CreateGroup(IGroups operations, GroupCreationRequest requestParameters)
at Microsoft.PowerBI.Common.Api.Workspaces.WorkspacesClient.NewWorkspaceAsUser(String workspaceName)
at Microsoft.PowerBI.Commands.Workspaces.NewPowerBIWorkspace.ExecuteCmdlet()
at Microsoft.PowerBI.Commands.Common.PowerBICmdlet.ProcessRecord()
Many thanks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the New-PowerBIWorkspace entry point and the Resolve-PowerBIError output. Reproduce the POST to https://api.powerbi.com/v1.0/myorg/groups using the reported command and request details, then trace the workspace client path shown in the stack trace. Done means identifying the cause of the 500 response and confirming that workspace creation succeeds or documenting the required conditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100