microsoft / microsoft/powerbi-powershell
New-PowerBIReport Cant handle Space in name or specialcharacters.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 413
- Forks
- 134
- Avg merge
- 33m
- Merged PRs (30d)
- 1
Description
Hi,
Having an issue with this module. New-PowerBIReport. Seems it doesnot handle space in name at all also doesnt handle åäö. I have tried excluding -Name but it doesn't help. Have also tried to Cast as an uri but no success.
No problems with rdl reports that doesn´t have space in the name.
$reportName = 'report demo.rdl'
$reportFile = 'C:\Temp\Reports\report demo.rdl'
$destinationWorkspaceId = 'xxxxxx'
$conflictAction = 'Overwrite'
New-PowerBIReport -Path $reportFile -Name $reportName -WorkspaceId $destinationWorkspaceId -ConflictAction $conflictAction -Verbose
VERBOSE: Request Uri: https://api.powerbi.com/v1.0/myorg/groups/xxxxxxxxxxxxxx/imports?datasetDisplayName=report demo.rdl&nameConflict=Abort
VERBOSE: Status Code: BadRequest (400)
ErrorMessage:
New-PowerBIReport : Operation returned an invalid status code 'BadRequest'
- CategoryInfo : WriteError: (Microsoft.Power...ewPowerBIReport:NewPowerBIReport) [New-PowerBIReport], HttpOperationException
- FullyQualifiedErrorId : Operation returned an invalid status code 'BadRequest',Microsoft.PowerBI.Commands.Reports.NewPowerBIReport
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-PowerBIReport command and the verbose import request shown in the issue, especially how the report name is placed in the Power BI imports URI. Reproduce the request using the supplied path and a name containing spaces or åäö; done means the report imports successfully with those names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100