On Friday 13th March 2026 I was able to create 2 Push API Datasets using the following cmdlet in my automation code:
'Add-PowerBIDataSet -DataSet $DataSet -WorkspaceId $trimedWorkspaceID'
I have also tried 'Add-PowerBIDataSet -DataSet $DataSet -Workspace $Workspace'
On Monday 16th March 2026 I tried to create 2 more Push API Datasets using the exact same piece of automation code use previously. In fact the same automation code has worked for many (12+) Push API Datasets I have created in my shared Workspace.
Using the same automation code I am able to create the same Push API Datasets in my "Personal Workspace "without any issues.
This is what "Resolve-PowerBiError -last "returns: (I have x'ed out the workspace id in this response)
Response : The request could not be processed due to missing or invalid information (400):
PowerBIErrorInfo :
RequestId : 31593841-8009-4cf3-ae20-754afe510fe9
ResponseDate : Fri, 20 Mar 2026 02:22:15 GMT
RequestMethod : POST
RequestUri : https://api.powerbi.com/v1.0/myorg/groups/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/datasets
Exception : Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'BadRequest'
at Microsoft.PowerBI.Api.V2.Datasets.d__33.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.DatasetsExtensions.d__125.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.DatasetsExtensions.PostDatasetInGroup(IDatasets operations, String groupId, Dataset dataset)
at Microsoft.PowerBI.Common.Api.Datasets.DatasetsClient.AddDataset(Dataset dataset, Nullable1 workspaceId) at Microsoft.PowerBI.Commands.Data.AddPowerBIDataset.ExecuteCmdlet() at Microsoft.PowerBI.Commands.Common.PowerBICmdlet.ProcessRecord() InnerException : False Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.PowerBI.Api.V2.Datasets.<PostDatasetInGroupWithHttpMessagesAsync>d__33.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.DatasetsExtensions.<PostDatasetInGroupAsync>d__125.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.DatasetsExtensions.PostDatasetInGroup(IDatasets operations, String groupId, Dataset dataset) at Microsoft.PowerBI.Common.Api.Datasets.DatasetsClient.AddDataset(Dataset dataset, Nullable1 workspaceId)
at Microsoft.PowerBI.Commands.Data.AddPowerBIDataset.ExecuteCmdlet()
at Microsoft.PowerBI.Commands.Common.PowerBICmdlet.ProcessRecord()
HelpLink :
Source : Microsoft.PowerBI.Api
ErrorDetails :
ErrorCategory : WriteError: (Microsoft.Power...dPowerBIDataset:AddPowerBIDataset) [Add-PowerBIDataset], HttpOperationException
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at , C:\Workspace\A016D1_Windows365\PowerBIReporting\CreateUpdateDatasetTables_V3.ps1: line 480
at , : line 1
- I have been told by our Power BI Admin team that there was no change to the tenant configuration over the weekend between the two dates I mentioned above.
- The account trying to create the Datasets has Admin rights on the shared workspace.
- I have tried using Invoke-PowerBIRestMethod, Invoke-Restmethod, Dotnet (using Add-Type -AssemblyName System.Net.Http) methods to POST the JSON formatted data and all return the same result BadResult 400!
- Microsoft Support have told me there had been no other changes that would now prevent the creation of the Push API Datasets using these odules. Microsoft Support retrieved the error message from a RequestID I supplied them and they returned the following "GetTargetTenantObjectId: Failed to parse GUID from the parameter tenantObjectIdFromUrlStr!"
- I have tried with Module versions 1.2.1111, 1.3.80 and 1.3.83 with no luck.
- The same Powershell modules are used to delete data and post data to the existing Puah API datasets with the same credential in same workspace.
- I have tried using different Proxies to get to the Power Bi Service
All have failed and AI has been helpful but have found not to be trustworty.
I apologise, I am not a Power Bi SME by any stretch but ff anyone has any insights that would be great. I have drained the well!
On Friday 13th March 2026 I was able to create 2 Push API Datasets using the following cmdlet in my automation code:
'Add-PowerBIDataSet -DataSet $DataSet -WorkspaceId $trimedWorkspaceID'
I have also tried 'Add-PowerBIDataSet -DataSet $DataSet -Workspace $Workspace'
On Monday 16th March 2026 I tried to create 2 more Push API Datasets using the exact same piece of automation code use previously. In fact the same automation code has worked for many (12+) Push API Datasets I have created in my shared Workspace.
Using the same automation code I am able to create the same Push API Datasets in my "Personal Workspace "without any issues.
This is what "Resolve-PowerBiError -last "returns: (I have x'ed out the workspace id in this response)
Response : The request could not be processed due to missing or invalid information (400):
PowerBIErrorInfo :
RequestId : 31593841-8009-4cf3-ae20-754afe510fe9
ResponseDate : Fri, 20 Mar 2026 02:22:15 GMT
RequestMethod : POST
RequestUri : https://api.powerbi.com/v1.0/myorg/groups/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/datasets
Exception : Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'BadRequest'
at Microsoft.PowerBI.Api.V2.Datasets.d__33.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.DatasetsExtensions.d__125.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.DatasetsExtensions.PostDatasetInGroup(IDatasets operations, String groupId, Dataset dataset)
at Microsoft.PowerBI.Common.Api.Datasets.DatasetsClient.AddDataset(Dataset dataset, Nullable
1 workspaceId) at Microsoft.PowerBI.Commands.Data.AddPowerBIDataset.ExecuteCmdlet() at Microsoft.PowerBI.Commands.Common.PowerBICmdlet.ProcessRecord() InnerException : False Message : Operation returned an invalid status code 'BadRequest' StackTrace : at Microsoft.PowerBI.Api.V2.Datasets.<PostDatasetInGroupWithHttpMessagesAsync>d__33.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.DatasetsExtensions.<PostDatasetInGroupAsync>d__125.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.DatasetsExtensions.PostDatasetInGroup(IDatasets operations, String groupId, Dataset dataset) at Microsoft.PowerBI.Common.Api.Datasets.DatasetsClient.AddDataset(Dataset dataset, Nullable1 workspaceId)at Microsoft.PowerBI.Commands.Data.AddPowerBIDataset.ExecuteCmdlet()
at Microsoft.PowerBI.Commands.Common.PowerBICmdlet.ProcessRecord()
HelpLink :
Source : Microsoft.PowerBI.Api
ErrorDetails :
ErrorCategory : WriteError: (Microsoft.Power...dPowerBIDataset:AddPowerBIDataset) [Add-PowerBIDataset], HttpOperationException
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at , C:\Workspace\A016D1_Windows365\PowerBIReporting\CreateUpdateDatasetTables_V3.ps1: line 480
at , : line 1
All have failed and AI has been helpful but have found not to be trustworty.
I apologise, I am not a Power Bi SME by any stretch but ff anyone has any insights that would be great. I have drained the well!