microsoft / microsoft/powerbi-powershell
Support -Tenant parameter on Connect-PowerBIServiceAccount when using the UserParameterSet and UserAndCredentialPasswordParameterSet
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
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 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