azure-powershell
azure-powershell copied to clipboard
Unable to save Azure context on Osx with PowerShell Core
Description
Command Enable-AzureRmContextAutosave seems do not work. When the PowerShell session is closed retention of login informations seems to not being saved.
Script/Steps for Reproduction
1. pwsh
2. Enable-AzureRmContextAutosave
3. Login-AzureRmAccount
4. Get-AzureRmContext > OK
5. Get-AzureRmResourceGroup > OK
6. Close Terminal
7. Open Terminal
8. Get-AzureRmContext > OK
9. Get-AzureRmResourceGroup > KO
Module Version
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 0.10.0 AzureRM.Profile.Netcore
Environment Data
$PSVersionTable
Name Value
---- -----
PSVersion 6.0.1
PSEdition Core
GitCommitId v6.0.1
OS Darwin 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 1...
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Debug Output
DEBUG: 16:51:12 - GetAzureResourceGroupCmdlet begin processing with ParameterSet 'GetByResourceGroupName'.
Get-AzureRmResourceGroup : Run Login-AzureRmAccount to login.
At line:1 char:1
+ Get-AzureRmResourceGroup
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureRmResourceGroup], PSInvalidOperationException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceGroupCmdlet
DEBUG: AzureQoSEvent: CommandName - Get-AzureRmResourceGroup; IsSuccess - False; Duration - 00:00:00.0847590; Exception - System.Management.Automation.PSInvalidOperationException: Run Login-AzureRmAccount to login.
at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.get_DefaultContext()
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.ResourceManagerCmdletBase.get_ResourceManagerSdkClient()
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceGroupCmdlet.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 16:51:13 - GetAzureResourceGroupCmdlet end processing.
DEBUG: 16:51:13 - GetAzureResourceGroupCmdlet end processing.
@twitchax Can you take a look at this issue?
@YoannGUILLO Yes, this is an issue with APIs we use to encrypt the TokenCache. We are preparing a candidate fix.
Perfect ! When this candidate fix will be released ?
Fix is checked in. Will be released next week (5/9)