Skip to content

Commit bdee21a

Browse files
authored
Fixed example numbering
Example #3 heading was listed twice
1 parent 6f09a3f commit bdee21a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Accounts/Accounts/help/Connect-AzAccount.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ The first command gets the service principal credentials (application id and ser
111111
The second command connect to Azure using the service principal credentials stored in $Credential for the specified Tenant.
112112
The ServicePrincipal switch parameter indicates that the account authenticates as a service principal.
113113

114-
### Example 3: Use an interactive login to connect to an account for a specific tenant and subscription
114+
### Example 4: Use an interactive login to connect to an account for a specific tenant and subscription
115115
```powershell
116116
PS C:\> Connect-AzAccount -Tenant "xxxx-xxxx-xxxx-xxxx" -SubscriptionId "yyyy-yyyy-yyyy-yyyy"
117117
@@ -122,7 +122,7 @@ [email protected] Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud
122122

123123
This command connects to an Azure account and configured AzureRM PowerShell to run cmdlets for the specified tenant and subscription by default.
124124

125-
### Example 4: Add an Account Using Managed Service Identity Login
125+
### Example 5: Add an Account Using Managed Service Identity Login
126126
```powershell
127127
PS C:\> Connect-AzAccount -Identity
128128
@@ -134,7 +134,7 @@ MSI@50342 Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud
134134
This command connects using the managed service identity of the host environment (for example, if executed on a
135135
VirtualMachine with an assigned Managed Service Identity, this will allow the code to login using that assigned identity)
136136

137-
### Example 5: Add an Account Using Managed Service Identity Login and ClientId
137+
### Example 6: Add an Account Using Managed Service Identity Login and ClientId
138138
```powershell
139139
PS C:\> $identity = Get-AzUserAssignedIdentity -ResourceGroupName "myResourceGroup" -Name "myUserAssignedIdentity"
140140
PS C:\> Get-AzVM -ResourceGroupName contoso -Name testvm | Update-AzVM -IdentityType UserAssigned -IdentityId $identity.Id
@@ -148,7 +148,7 @@ yyyy-yyyy-yyyy-yyyy Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud
148148
This command connects using the managed service identity of "myUserAssignedIdentity" by adding the User Assigned Identity to the Virtual Machine, then connecting using the ClientId of the User Assigned Identity.
149149
More information about configuring Managed Identities can be found here: https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/qs-configure-powershell-windows-vm.
150150

151-
### Example 6: Add an Account Using Managed Service Identity Login and ClientId
151+
### Example 7: Add an Account Using Managed Service Identity Login and ClientId
152152
```powershell
153153
PS C:\> $identity = Get-AzUserAssignedIdentity -ResourceGroupName "myResourceGroup" -Name "myUserAssignedIdentity"
154154
PS C:\> Get-AzVM -ResourceGroupName contoso -Name testvm | Update-AzVM -IdentityType UserAssigned -IdentityId $identity.Id
@@ -162,7 +162,7 @@ yyyy-yyyy-yyyy-yyyy Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud
162162
This command connects using the managed service identity of "myUserAssignedIdentity" by adding the User Assigned Identity to the Virtual Machine, then connecting using the Id of the User Assigned Identity.
163163
More information about configuring Managed Identities can be found here: https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/qs-configure-powershell-windows-vm.
164164

165-
### Example 7: Add an account using certificates
165+
### Example 8: Add an account using certificates
166166
```powershell
167167
# For more information on creating a self-signed certificate
168168
# and giving it proper permissions, please see the following:
@@ -185,7 +185,7 @@ Environment : AzureCloud
185185

186186
This command connects to an Azure account using certificate-based service principal authentication. The service principal used for authentication should have been created with the given certificate.
187187

188-
### Example 8: Add an account using AccessToken authentication
188+
### Example 9: Add an account using AccessToken authentication
189189
```powershell
190190
PS C:\> $url = "https://login.windows.net/<TenantId>/oauth2/token"
191191
PS C:\> $body = "grant_type=refresh_token&refresh_token=<refreshtoken>" # Refresh token obtained from ~/.azure/TokenCache.dat

0 commit comments

Comments
 (0)