Skip to content

Commit 3f92c7e

Browse files
author
Hovsep Mkrtchyan
committed
[#106171538] Changed Tenant to TenantId in cmdletst
1 parent 3f2656b commit 3f92c7e

File tree

6 files changed

+43
-38
lines changed

6 files changed

+43
-38
lines changed

src/ResourceManager/Profile/Commands.Profile/Account/AddAzureRmAccount.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ public class AddAzureRMAccountCommand : AzureRMCmdlet , IModuleAssemblyInitializ
4848
[Parameter(ParameterSetName = "User", Mandatory = false, HelpMessage = "Optional tenant name or ID")]
4949
[Parameter(ParameterSetName = "ServicePrincipal", Mandatory = true, HelpMessage = "TenantId name or ID")]
5050
[Parameter(ParameterSetName = "AccessToken", Mandatory = false, HelpMessage = "TenantId name or ID")]
51+
[Alias("Tenant")]
5152
[ValidateNotNullOrEmpty]
52-
public string Tenant { get; set; }
53+
public string TenantId { get; set; }
5354

5455
[Parameter(ParameterSetName = "AccessToken", Mandatory = true, HelpMessage = "AccessToken")]
5556
[ValidateNotNullOrEmpty]

src/ResourceManager/Profile/Commands.Profile/Microsoft.Azure.Commands.Profile.dll-Help.xml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</command:details>
1717
<maml:description>
1818
<maml:para>NOTE THAT THIS CMDLET AUTHENTICATES ONLY AZURE RESOURCE MANAGER CMDLETS. SERVICE MANAGEMENT CMDLETS MUST BE SEPARATELY AUTHENTICATED USING THE ADD-AZUREACCOUNT OR IMPORT-AZUREPUBLISHSETTINGSFILE CMDLETS.</maml:para>
19-
<maml:para>Log in to Azure Resource manager to provide authentication for management cmdlets. Microsoft Account (Live Id) and Oragnization Id credentials may be provided through the dialog prompt. Organizational ID and Service Principal credentials may be provided through a -Credential parameter. Access Token credentials may be provided through the AccessToken credential. By default, user is authenticated agains all available teants. The TenantId parameter may be provided to streamline authentication when access to only a single teant is needed. The SubscriptionId parameter may be provided to select a particular subscription by default, otherwise the first listed subscription will be selected.</maml:para>
19+
<maml:para>Log in to Azure Resource manager to provide authentication for management cmdlets. Microsoft Account (Live Id) and Organization Id credentials may be provided through the dialog prompt. Organizational ID and Service Principal credentials may be provided through a -Credential parameter. Access Token credentials may be provided through the AccessToken credential. By default, user is authenticated against all available tenants. The TenantId parameter may be provided to streamline authentication when access to only a single tenant is needed. The SubscriptionId parameter may be provided to select a particular subscription by default, otherwise the first listed subscription will be selected.</maml:para>
2020
</maml:description>
2121
<command:syntax>
2222
<command:syntaxItem>
@@ -31,12 +31,12 @@
3131
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
3232
<maml:name>Credential</maml:name>
3333
<maml:description>
34-
<maml:para>Securely provide the user id and password for Organization Id credentials or the Application Id and Secret for Service Principal credentials. The provided credentials will be sued to acquire tokens for authenticataing ARM cmdlets with Azure.</maml:para>
34+
<maml:para>Securely provide the user id and password for Organization Id credentials or the Application Id and Secret for Service Principal credentials. The provided credentials will be used to acquire tokens for authenticating ARM cmdlets with Azure.</maml:para>
3535
</maml:description>
3636
<command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue>
3737
</command:parameter>
3838
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
39-
<maml:name>Tenant</maml:name>
39+
<maml:name>TenantId</maml:name>
4040
<maml:description>
4141
<maml:para>If provided, limit authentication to only the provided tenant. This parameter is required for authentication as a service principal.</maml:para>
4242
</maml:description>
@@ -76,19 +76,19 @@
7676
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
7777
<maml:name>Credential</maml:name>
7878
<maml:description>
79-
<maml:para>Securely provide the user id and password for Organization Id credentials or the Application Id and Secret for Service Principal credentials. The provided credentials will be sued to acquire tokens for authenticataing ARM cmdlets with Azure.</maml:para>
79+
<maml:para>Securely provide the user id and password for Organization Id credentials or the Application Id and Secret for Service Principal credentials. The provided credentials will be sued to acquire tokens for authenticating ARM cmdlets with Azure.</maml:para>
8080
</maml:description>
8181
<command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue>
8282
</command:parameter>
8383
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named">
8484
<maml:name>ServicePrincipal</maml:name>
8585
<maml:description>
86-
<maml:para>When provided, indicates that service princiapl credentials will be provided via the Credential parameter and the Tenant containing the given Servicew Principal will be provided in the TenantId parameter.</maml:para>
86+
<maml:para>When provided, indicates that service principal credentials will be provided via the Credential parameter and the Tenant containing the given Service Principal will be provided in the TenantId parameter.</maml:para>
8787
</maml:description>
8888
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
8989
</command:parameter>
9090
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
91-
<maml:name>Tenant</maml:name>
91+
<maml:name>TenantId</maml:name>
9292
<maml:description>
9393
<maml:para>If provided, limit authentication to only the provided tenant. This parameter is required for authentication as a service principal.</maml:para>
9494
</maml:description>
@@ -126,7 +126,7 @@
126126
<command:parameterValue required="true" variableLength="false">AzureEnvironment</command:parameterValue>
127127
</command:parameter>
128128
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
129-
<maml:name>Tenant</maml:name>
129+
<maml:name>TenantId</maml:name>
130130
<maml:description>
131131
<maml:para>If provided, limit authentication to only the provided tenant. This parameter is required for authentication as a service principal.</maml:para>
132132
</maml:description>
@@ -178,7 +178,7 @@
178178
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
179179
<maml:name>Credential</maml:name>
180180
<maml:description>
181-
<maml:para>Securely provide the user id and password for Organization Id credentials or the Application Id and Secret for Service Principal credentials. The provided credentials will be sued to acquire tokens for authenticataing ARM cmdlets with Azure.</maml:para>
181+
<maml:para>Securely provide the user id and password for Organization Id credentials or the Application Id and Secret for Service Principal credentials. The provided credentials will be used to acquire tokens for authenticating ARM cmdlets with Azure.</maml:para>
182182
</maml:description>
183183
<command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue>
184184
<dev:type>
@@ -188,7 +188,7 @@
188188
<dev:defaultValue>None</dev:defaultValue>
189189
</command:parameter>
190190
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
191-
<maml:name>Tenant</maml:name>
191+
<maml:name>TenantId</maml:name>
192192
<maml:description>
193193
<maml:para>If provided, limit authentication to only the provided tenant. This parameter is required for authentication as a service principal.</maml:para>
194194
</maml:description>
@@ -240,7 +240,7 @@
240240
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named">
241241
<maml:name>ServicePrincipal</maml:name>
242242
<maml:description>
243-
<maml:para>When provided, indicates that service princiapl credentials will be provided via the Credential parameter and the Tenant containing the given Servicew Principal will be provided in the TenantId parameter.</maml:para>
243+
<maml:para>When provided, indicates that service principal credentials will be provided via the Credential parameter and the Tenant containing the given Service Principal will be provided in the TenantId parameter.</maml:para>
244244
</maml:description>
245245
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
246246
<dev:type>
@@ -310,13 +310,13 @@
310310
</maml:introduction>
311311
<dev:code>Add-AzureRmAccount</dev:code>
312312
<dev:remarks>
313-
<maml:para>Displays a dialog where Microsoft Account or Oragnizational Id credentials may be provided. The given credentials will be used to acquire a token for authentication with Azure Resource Manager. Note that if multi-factor authentication (MFA) is enabled for your credentials, you must log in using the interactive option, or use Service Principal authentication.</maml:para>
313+
<maml:para>Displays a dialog where Microsoft Account or Organizational Id credentials may be provided. The given credentials will be used to acquire a token for authentication with Azure Resource Manager. Note that if multi-factor authentication (MFA) is enabled for your credentials, you must log in using the interactive option, or use Service Principal authentication.</maml:para>
314314
<maml:para />
315315
<maml:para />
316316
<maml:para>Account: [email protected]
317317
Environment: AzureCloud
318-
Subscription: xxxx-xxxx-xxxx-xxxx
319-
Tenant: xxxx-xxxx-xxxx-xxxx</maml:para>
318+
SubscriptionId: xxxx-xxxx-xxxx-xxxx
319+
TenantId: xxxx-xxxx-xxxx-xxxx</maml:para>
320320
</dev:remarks>
321321
<command:commandLines>
322322
<command:commandLine>
@@ -340,8 +340,8 @@ Add-AzureRmAccount -Credential $credential</dev:code>
340340
<maml:para />
341341
<maml:para>Account: [email protected]
342342
Environment: AzureChinacloud
343-
Subscription: xxxx-xxxx-xxxx-xxxx
344-
Tenant: xxxx-xxxx-xxxx-xxxx</maml:para>
343+
SubscriptionId: xxxx-xxxx-xxxx-xxxx
344+
TenantId: xxxx-xxxx-xxxx-xxxx</maml:para>
345345
</dev:remarks>
346346
<command:commandLines>
347347
<command:commandLine>
@@ -387,8 +387,8 @@ Tenant: zzzz-zzzz-zzzz-zzzz</maml:para>
387387
<maml:para />
388388
<maml:para>Account: [email protected]
389389
Environment: AzureCloud
390-
Subscription: yyyy-yyyy-yyyy-yyyy
391-
Tenant: xxxx-xxxx-xxxx-xxxx</maml:para>
390+
SubscriptionId: yyyy-yyyy-yyyy-yyyy
391+
TenantId: xxxx-xxxx-xxxx-xxxx</maml:para>
392392
</dev:remarks>
393393
<command:commandLines>
394394
<command:commandLine>
@@ -467,7 +467,7 @@ Tenant: xxxx-xxxx-xxxx-xxxx</maml:para>
467467
<dev:version />
468468
</command:details>
469469
<maml:description>
470-
<maml:para>Add endpoints and metdaata that allow Azure Resource Manager cmdlets to connect with a new instance of Azure Resource Manager. Built-in environments AzureCloud and AzureChinaCloud target existing public instances of Azure Resource Manager.</maml:para>
470+
<maml:para>Add endpoints and metdata that allow Azure Resource Manager cmdlets to connect with a new instance of Azure Resource Manager. Built-in environments AzureCloud and AzureChinaCloud target existing public instances of Azure Resource Manager.</maml:para>
471471
</maml:description>
472472
<command:syntax>
473473
<command:syntaxItem>
@@ -580,7 +580,7 @@ Tenant: xxxx-xxxx-xxxx-xxxx</maml:para>
580580
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="15">
581581
<maml:name>AdTenant</maml:name>
582582
<maml:description>
583-
<maml:para>The default Active Direcotyr Tenant.</maml:para>
583+
<maml:para>The default Active Directory Tenant.</maml:para>
584584
</maml:description>
585585
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
586586
</command:parameter>
@@ -799,7 +799,7 @@ Tenant: xxxx-xxxx-xxxx-xxxx</maml:para>
799799
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="15">
800800
<maml:name>AdTenant</maml:name>
801801
<maml:description>
802-
<maml:para>The default Active Direcotyr Tenant.</maml:para>
802+
<maml:para>The default Active Directory Tenant.</maml:para>
803803
</maml:description>
804804
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
805805
<dev:type>
@@ -1168,7 +1168,7 @@ Tenant: xxxx-xxxx-xxxx-xxxx</maml:para>
11681168
<dev:version />
11691169
</command:details>
11701170
<maml:description>
1171-
<maml:para>Get detailed information, inbclusing subscription id, subscription name, and home tenant about subscriptions the current account can access.</maml:para>
1171+
<maml:para>Get detailed information, including subscription id, subscription name, and home tenant about subscriptions the current account can access.</maml:para>
11721172
</maml:description>
11731173
<command:syntax>
11741174
<command:syntaxItem>
@@ -1500,7 +1500,7 @@ Subscription Name: Contoso Subscription 1</maml:para>
15001500
<command:syntaxItem>
15011501
<maml:name>Get-AzureRmTenant</maml:name>
15021502
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
1503-
<maml:name>Tenant</maml:name>
1503+
<maml:name>TenantId</maml:name>
15041504
<maml:description>
15051505
<maml:para>Tenant to get information about. If not provided, all authorized tenants are returned.</maml:para>
15061506
</maml:description>
@@ -1524,7 +1524,7 @@ Subscription Name: Contoso Subscription 1</maml:para>
15241524
</command:syntax>
15251525
<command:parameters>
15261526
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
1527-
<maml:name>Tenant</maml:name>
1527+
<maml:name>TenantId</maml:name>
15281528
<maml:description>
15291529
<maml:para>Tenant to get information about. If not provided, all authorized tenants are returned.</maml:para>
15301530
</maml:description>
@@ -2182,9 +2182,9 @@ Subscription Name: Contoso Subscription 1</maml:para>
21822182
<command:syntaxItem>
21832183
<maml:name>Set-AzureRmContext</maml:name>
21842184
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
2185-
<maml:name>Tenant</maml:name>
2185+
<maml:name>TenantId</maml:name>
21862186
<maml:description>
2187-
<maml:para>The tenant to taret in this session.</maml:para>
2187+
<maml:para>The tenant to target in this session.</maml:para>
21882188
</maml:description>
21892189
<command:parameterValue required="true" variableLength="false">AzureTenant</command:parameterValue>
21902190
</command:parameter>
@@ -2265,9 +2265,9 @@ Subscription Name: Contoso Subscription 1</maml:para>
22652265
</dev:defaultValue>
22662266
</command:parameter>
22672267
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
2268-
<maml:name>Tenant</maml:name>
2268+
<maml:name>TenantId</maml:name>
22692269
<maml:description>
2270-
<maml:para>The tenant to taret in this session.</maml:para>
2270+
<maml:para>The tenant to target in this session.</maml:para>
22712271
</maml:description>
22722272
<command:parameterValue required="true" variableLength="false">AzureTenant</command:parameterValue>
22732273
<dev:type>
@@ -2344,8 +2344,8 @@ Subscription Name: Contoso Subscription 1</maml:para>
23442344
<maml:para />
23452345
<maml:para>Account: [email protected]
23462346
Environment: AzureCloud
2347-
Subscription: xxxx-xxxx-xxxx-xxxx
2348-
Tenant: yyyy-yyyy-yyyy-yyyy</maml:para>
2347+
SubscriptionId: xxxx-xxxx-xxxx-xxxx
2348+
TenantId: yyyy-yyyy-yyyy-yyyy</maml:para>
23492349
</dev:remarks>
23502350
<command:commandLines>
23512351
<command:commandLine>
@@ -2497,7 +2497,7 @@ Tenant: yyyy-yyyy-yyyy-yyyy</maml:para>
24972497
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="15">
24982498
<maml:name>AdTenant</maml:name>
24992499
<maml:description>
2500-
<maml:para>The default Active Direcotyr Tenant.</maml:para>
2500+
<maml:para>The default Active Directory Tenant.</maml:para>
25012501
</maml:description>
25022502
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
25032503
</command:parameter>
@@ -2716,7 +2716,7 @@ Tenant: yyyy-yyyy-yyyy-yyyy</maml:para>
27162716
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="15">
27172717
<maml:name>AdTenant</maml:name>
27182718
<maml:description>
2719-
<maml:para>The default Active Direcotyr Tenant.</maml:para>
2719+
<maml:para>The default Active Directory Tenant.</maml:para>
27202720
</maml:description>
27212721
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
27222722
<dev:type>

src/ResourceManager/Profile/Commands.Profile/Microsoft.Azure.Commands.Profile.format.ps1xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
<ScriptBlock>$_.Context.Account.ToString()</ScriptBlock>
2020
</ListItem>
2121
<ListItem>
22-
<Label>Tenant</Label>
22+
<Label>TenantId</Label>
2323
<ScriptBlock>$_.Context.Tenant.ToString()</ScriptBlock>
2424
</ListItem>
2525
<ListItem>
26-
<Label>Subscription</Label>
26+
<Label>SubscriptionId</Label>
2727
<ScriptBlock>$_.Context.Subscription.ToString()</ScriptBlock>
2828
</ListItem>
2929
<ListItem>
@@ -51,10 +51,12 @@
5151
<PropertyName>Account</PropertyName>
5252
</ListItem>
5353
<ListItem>
54-
<PropertyName>Tenant</PropertyName>
54+
<Label>TenantId</Label>
55+
<ScriptBlock>$_.Tenant.ToString()</ScriptBlock>
5556
</ListItem>
5657
<ListItem>
57-
<PropertyName>Subscription</PropertyName>
58+
<Label>SubscriptionId</Label>
59+
<ScriptBlock>$_.Subscription.ToString()</ScriptBlock>
5860
</ListItem>
5961
<ListItem>
6062
<Label>CurrentStorageAccount</Label>

src/ResourceManager/Profile/Commands.Profile/Tenant/GetAzureRMTenant.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ namespace Microsoft.Azure.Commands.Profile
2929
public class GetAzureRMTenantCommand : AzureRMCmdlet
3030
{
3131
[Parameter(Mandatory = false, Position = 0, ValueFromPipelineByPropertyName = true)]
32-
[Alias("Domain")]
32+
[Alias("Domain", "Tenant")]
3333
[ValidateNotNullOrEmpty]
34-
public string Tenant { get; set; }
34+
public string TenantId { get; set; }
3535

3636
protected override void ProcessRecord()
3737
{

src/ServiceManagement/Profile/Commands.Profile/Account/AddAzureAccount.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class AddAzureAccount : SubscriptionCmdletBase
4040

4141
[Parameter(ParameterSetName = "User", Mandatory = false, HelpMessage = "Optional tenant name or ID")]
4242
[Parameter(ParameterSetName = "ServicePrincipal", Mandatory = true, HelpMessage = "Tenant name or ID")]
43+
[Alias("TenantId")]
4344
public string Tenant { get; set; }
4445

4546
public AddAzureAccount() : base(true)

src/ServiceManagement/Profile/Commands.Profile/Profile/NewAzureProfile.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public class NewAzureProfileCommand : AzureSMCmdlet
8282

8383
[Parameter(Mandatory = false, Position = 2, ParameterSetName = CredentialsParameterSet)]
8484
[Parameter(Mandatory = true, Position = 2, ParameterSetName = ServicePrincipalParameterSet)]
85+
[Alias("TenantId")]
8586
public string Tenant { get; set; }
8687

8788
[Parameter(Mandatory = true, ParameterSetName = ServicePrincipalParameterSet)]

0 commit comments

Comments
 (0)