You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Accounts/Accounts/Token/GetAzureRmAccessToken.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@
29
29
30
30
namespaceMicrosoft.Azure.Commands.Profile
31
31
{
32
-
[GenericBreakingChangeWithVersion("The Token property of the output type will be changed from String to SecureString. Add the [-AsSecureString] switch to avoid the impact of this upcoming breaking change.","13.0.0","4.0.0")]
32
+
[GenericBreakingChangeWithVersion("The Token property of the output type will be changed from String to SecureString. Add the [-AsSecureString] switch to avoid the impact of this upcoming breaking change.","14.0.0","4.0.0")]
Copy file name to clipboardExpand all lines: src/Accounts/Accounts/help/Az.Accounts.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ Enables AzureRm prefix aliases for Az modules.
60
60
Exports all the configs into a file so that it can be imported on another machine.
61
61
62
62
### [Get-AzAccessToken](Get-AzAccessToken.md)
63
-
Get raw access token. When using -ResourceUrl, please make sure the value does match current Azure environment. You may refer to the value of `(Get-AzContext).Environment`.
63
+
Get secure access token. When using -ResourceUrl, please make sure the value does match current Azure environment. You may refer to the value of `(Get-AzContext).Environment`.
Copy file name to clipboardExpand all lines: src/Accounts/Accounts/help/Get-AzAccessToken.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,8 @@ schema: 2.0.0
8
8
# Get-AzAccessToken
9
9
10
10
## SYNOPSIS
11
-
Get raw access token. When using -ResourceUrl, please make sure the value does match current Azure environment. You may refer to the value of `(Get-AzContext).Environment`.
11
+
Get secure raw access token. When using -ResourceUrl, please make sure the value does match current Azure environment. You may refer to the value of `(Get-AzContext).Environment`.
12
+
> **_NOTE:_** The current default output token type is going to be changed from plain text `String` to `SecureString` for security. Please use `-AsSecureString` to migrate to the secure behaviour before the breaking change takes effects.
12
13
13
14
## SYNTAX
14
15
@@ -31,21 +32,21 @@ Get access token
31
32
32
33
### Example 1 Get the access token for ARM endpoint
33
34
```powershell
34
-
Get-AzAccessToken
35
+
Get-AzAccessToken -AsSecureString
35
36
```
36
37
37
38
Get access token of current account for ResourceManager endpoint
38
39
39
40
### Example 2 Get the access token for Microsoft Graph endpoint
Get access token of Microsoft Graph endpoint for current account
@@ -54,6 +55,7 @@ Get access token of Microsoft Graph endpoint for current account
54
55
55
56
### -AsSecureString
56
57
Specifiy to convert output token as a secure string.
58
+
Please always use the parameter for security purpose and to avoid the upcoming breaking chang and refer to [Frequently asked questions about Azure PowerShell](https://learn.microsoft.com/en-us/powershell/azure/faq) for how to convert from `SecureString` to plain text.
0 commit comments