diff --git a/src/Modules/Profile/Commands.Profile/ConnectPowerBIServiceAccount.cs b/src/Modules/Profile/Commands.Profile/ConnectPowerBIServiceAccount.cs index cf8521d7..436a9be9 100644 --- a/src/Modules/Profile/Commands.Profile/ConnectPowerBIServiceAccount.cs +++ b/src/Modules/Profile/Commands.Profile/ConnectPowerBIServiceAccount.cs @@ -55,8 +55,7 @@ public class ConnectPowerBIServiceAccount : PowerBICmdlet public SwitchParameter ServicePrincipal { get; set; } [Alias("TenantId")] - [Parameter(ParameterSetName = ServicePrincipalParameterSet, Mandatory = false)] - [Parameter(ParameterSetName = ServicePrincipalCertificateParameterSet, Mandatory = false)] + [Parameter(Mandatory = false)] public string Tenant { get; set; } [Parameter(Mandatory = false)] @@ -121,6 +120,7 @@ public override void ExecuteCmdlet() } environment = this.Settings.Environments[this.Environment]; } + if(!string.IsNullOrEmpty(this.Tenant)) { var tempEnvironment = (PowerBIEnvironment) environment; diff --git a/src/Modules/Profile/Commands.Profile/help/Connect-PowerBIServiceAccount.md b/src/Modules/Profile/Commands.Profile/help/Connect-PowerBIServiceAccount.md index b22a9479..bbeab3e1 100644 --- a/src/Modules/Profile/Commands.Profile/help/Connect-PowerBIServiceAccount.md +++ b/src/Modules/Profile/Commands.Profile/help/Connect-PowerBIServiceAccount.md @@ -15,7 +15,7 @@ Log in to the Power BI service. ### User (Default) ``` Connect-PowerBIServiceAccount [-Environment ] [-CustomEnvironment ] - [-DiscoveryUrl ] [] + [-Tenant ] [-DiscoveryUrl ] [] ``` ### ServicePrincipal @@ -28,7 +28,7 @@ Connect-PowerBIServiceAccount [-Environment ] [-CustomEn ### UserAndCredential ``` Connect-PowerBIServiceAccount [-Environment ] [-CustomEnvironment ] - -Credential [-DiscoveryUrl ] [] + -Credential [-Tenant ] [-DiscoveryUrl ] [] ``` ### ServicePrincipalCertificate @@ -159,7 +159,7 @@ Cloud environment to connect against. Default is Public. Type: PowerBIEnvironmentType Parameter Sets: (All) Aliases: -Accepted values: Public, Germany, USGov, China, USGovHigh, USGovMil, OneBox, EDog, DXT +Accepted values: Public, Germany, USGov, China, USGovHigh, USGovMil, Custom, OneBox, EDog, DXT Required: False Position: Named @@ -188,7 +188,7 @@ Tenant name or tenant ID containing the service principal account. If not specif ```yaml Type: String -Parameter Sets: ServicePrincipal, ServicePrincipalCertificate +Parameter Sets: (All) Aliases: TenantId Required: False