microsoft / microsoft/powerbi-powershell

New-PowerBIReport Cant handle Space in name or specialcharacters.

Open
#376 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.