Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow -Tenant parameter on Connect-PowerBIServiceAccount for all parametersets #257

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -121,6 +120,7 @@ public override void ExecuteCmdlet()
}
environment = this.Settings.Environments[this.Environment];
}

if(!string.IsNullOrEmpty(this.Tenant))
{
var tempEnvironment = (PowerBIEnvironment) environment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Log in to the Power BI service.
### User (Default)
```
Connect-PowerBIServiceAccount [-Environment <PowerBIEnvironmentType>] [-CustomEnvironment <String>]
[-DiscoveryUrl <String>] [<CommonParameters>]
[-Tenant <String>] [-DiscoveryUrl <String>] [<CommonParameters>]
```

### ServicePrincipal
Expand All @@ -28,7 +28,7 @@ Connect-PowerBIServiceAccount [-Environment <PowerBIEnvironmentType>] [-CustomEn
### UserAndCredential
```
Connect-PowerBIServiceAccount [-Environment <PowerBIEnvironmentType>] [-CustomEnvironment <String>]
-Credential <PSCredential> [-DiscoveryUrl <String>] [<CommonParameters>]
-Credential <PSCredential> [-Tenant <String>] [-DiscoveryUrl <String>] [<CommonParameters>]
```

### ServicePrincipalCertificate
Expand Down Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Custom environment is supported via -CustomEnvironment


Required: False
Position: Named
Expand Down Expand Up @@ -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
Expand Down