microsoft / microsoft/powerbi-powershell

Support -Tenant parameter on Connect-PowerBIServiceAccount when using the UserParameterSet and UserAndCredentialPasswordParameterSet

Open
#244 4 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

I'm creating some PBI data-tenants that are managed by B2B admins. We'd like these admins to be able to run the PBI PowerShell commands but the Connect-PowerBIServiceAccount doesn't allow specifying the -Tenant parameter for the 'User' parameter set.

This prevents B2B guest admins from being able to administer the PBI tenant, like create workspaces, etc.

Command:

Connect-PowerBIServiceAccount -TenantId 'ad347600-0000-0000-0000-000000000000'

Give the following error:

Connect-PowerBIServiceAccount : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ Connect-PowerBIServiceAccount -TenantId 'ad347600-0000-0000-0000-0000 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Connect-PowerBIServiceAccount], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.PowerBI.Commands.Profile.ConnectPowerBIServiceAccount

I'm running version 1.0.840 of the MicrosoftPowerBIMgmt module.

The original PR that added the -Tenant parameter was: https://github.com/microsoft/powerbi-powershell/pull/42/files

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 by inspecting the Connect-PowerBIServiceAccount parameter definitions and the files changed by the linked original PR that added -Tenant. Reproduce the command with the User and UserAndCredentialPasswordParameterSet cases. Done means -TenantId is accepted without an ambiguous parameter-set error for those user authentication modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.