Skip to content

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

@joem-msft

Description

@joem-msft

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions