Skip to content

Commit 30aa289

Browse files
authored
Updated to avoid clear text password in logs (#25160)
Co-authored-by: Mike F. Robbins <[email protected]>
1 parent d1d2354 commit 30aa289

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ [email protected] Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud
151151

152152
### Example 3: Connect to Azure using a service principal account
153153

154-
The first command stores the service principal credentials in the `$Credential` variable. The second
155-
command connects the specified Azure tenant using the service principal credentials stored in the
154+
This command stores the service principal credentials in the `$Credential` variable. Then, it
155+
connects to the specified Azure tenant using the service principal credentials stored in the
156156
`$Credential` variable. The **ServicePrincipal** switch parameter indicates that the account
157157
authenticates as a service principal.
158158

159159
```powershell
160-
$SecurePassword = ConvertTo-SecureString -String "Password123!" -AsPlainText -Force
160+
$SecurePassword = Read-Host -Prompt 'Enter a Password' -AsSecureString
161161
$TenantId = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy'
162162
$ApplicationId = 'zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzz'
163163
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $ApplicationId, $SecurePassword

0 commit comments

Comments
 (0)