-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
Azure PS TeamMonitor - ApplicationInsightsbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.
Description
Description
Get-AzApplicationInsights returns a subscription ID null error when you're not authenticated. It should return an error like Get-AzResource.
Current behavior:
PS C:\> Get-AzApplicationInsights
Get-AzApplicationInsights_List: C:\Program Files\PowerShell\Modules\Az.ApplicationInsights\2.2.5\ApplicationInsights.Autorest\internal\ProxyCmdletDefinitions.ps1:1528
Line |
1528 | $scriptCmd = {& $wrappedCmd @PSBoundParameters}
| ~~~~~~~~~~~~~~~~~~
| Cannot bind argument to parameter 'SubscriptionId' because it is null.
PS C:\>Expected behavior:
PS C:\> Get-AzApplicationInsights
Get-AzApplicationInsights: Run Connect-AzAccount to login.
PS C:\>Issue script & Debug output
PS C:\> Get-AzApplicationInsights
DEBUG: 10:59:54 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 10:59:54 AM - GetAzureRMContextCommand begin processing with ParameterSet 'GetSingleContext'.
DEBUG: 10:59:54 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 10:59:54 AM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 10:59:54 AM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 10:59:54 AM - GetAzureRMContextCommand end processing.
Get-AzApplicationInsights_List: C:\Program Files\PowerShell\Modules\Az.ApplicationInsights\2.2.5\ApplicationInsights.Autorest\internal\ProxyCmdletDefinitions.ps1:1528
Line |
1528 | $scriptCmd = {& $wrappedCmd @PSBoundParameters}
| ~~~~~~~~~~~~~~~~~~
| Cannot bind argument to parameter 'SubscriptionId' because it is null.
PS C:\>Environment data
Name Value
---- -----
PSVersion 7.4.5
PSEdition Core
GitCommitId 7.4.5
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Module versions
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 12.3.0 AzPreview Core,DeskError output
HistoryId: 2
Message : Cannot bind argument to parameter 'SubscriptionId' because it is null.
StackTrace : at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at Microsoft.PowerShell.Executor.ExecuteCommandHelper(Pipeline tempPipeline, Exception&
exceptionThrown, ExecutionOptions options)
Exception : System.Management.Automation.ParameterBindingValidationException
InvocationInfo : {Get-AzApplicationInsights_List}
Line : $scriptCmd = {& $wrappedCmd @PSBoundParameters}
Position : At C:\Program Files\PowerShell\Modules\Az.ApplicationInsights\2.2.5\ApplicationInsights.Autorest\inter
nal\ProxyCmdletDefinitions.ps1:1528 char:37
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ ~~~~~~~~~~~~~~~~~~
HistoryId : 2Metadata
Metadata
Assignees
Labels
Azure PS TeamMonitor - ApplicationInsightsbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.