Azure / Azure/azure-powershell

Connect-AzAccount works through powershell but not when called by C# application running in VS2022

Open
#27,374 6 comments 1 reaction 0 assignees View on GitHub
bug customer-reported Possible-Solution Similar-Issue
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

### Description

I have a windows forms application that we migrated to .NET 9 so that Microsoft.Powershell.SDK will run Powershell 7 instead of Powershell 5 due to issues we were facing with Connect-AzAccount in PowerShell 5. From Powershell 7, I can run Connect-AzAccount with no issue, but when I execute the command vai a PowerShell object in C#, the interactive browser login does not open, and I get a Method not found error for Azure.Identity,InteractiveBrowserCredential.AuthenticateAsync.

I have tried disabling WAM, turning off the V2 Login Experience and connecting using a service account:

```powershell
#Update-AzConfig -EnableLoginByWam $false
#Update-AzConfig -LoginExperienceV2 Off
```

Connecting using a service account - this returned an "Entry point not found" error and seems to be using a different API call than when I run it directly in Powershell v7
- From C#

```
Request [413f8576-e5b0-453a-aa24-88428e8b4475] GET https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=REDACTED
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
x-ms-client-request-id:413f8576-e5b0-453a-aa24-88428e8b4475
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.13.0 (.NET 9.0.3; Microsoft Windows 10.0.14393)
client assembly: Azure.Identity"
```

- From Powershell
```
Request [32df3b28-8fc5-4651-81cc-23acb0231378] POST https://login.microsoftonline.com/zzzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzzz/oauth2/v2.0/token
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
x-client-current-telemetry:REDACTED
x-ms-PKeyAuth:REDACTED
x-ms-lib-capability:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
Content-Type:application/x-www-form-urlencoded
x-ms-client-request-id:32df3b28-8fc5-4651-81cc-23acb0231378
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.13.0 (.NET 9.0.1; Microsoft Windows 10.0.14393)
client assembly: Azure.Identity
```

### Issue script & Debug output

```PowerShell
$DebugPreference = 'Continue'
Clear-AzContext -Force
Connect-AzAccount

DebugRecord.Message
Initializing ConditionalAssemblyContext. PSEdition is [Core]. PSVersion is [7.5.0].
Initializing ConditionalAssemblyProvider. AssemblyRootPath is [C:\Users\user\Documents\PowerShell\Modules\Az.Accounts\4.0.2\StartupScripts\..\lib].
Registering Az shared AssemblyLoadContext.
AssemblyLoadContext registered.
Initializing PSStyle.
1:04:27 PM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
1:04:27 PM - ClearAzureRmContext begin processing with ParameterSet '__AllParameterSets'.
1:04:27 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [Az.Accounts], Cmdlet = [Clear-AzContext]. Returning default value [True].
1:04:27 PM - Autosave setting from startup session: 'CurrentUser'
1:04:27 PM - No autosave setting detected in environment variable 'AzContextAutoSave'.
1:04:27 PM - Using Autosave scope 'CurrentUser'
1:04:27 PM - Autosave setting from startup session: 'CurrentUser'
1:04:27 PM - No autosave setting detected in environment variable 'AzContextAutoSave'.
1:04:27 PM - Using Autosave scope 'CurrentUser'
1:04:27 PM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
1:04:27 PM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
AzureQoSEvent: Module: Az.Accounts:4.0.2; CommandName: Clear-AzContext; PSVersion: 7.5.0; IsSuccess: True; Duration: 00:00:00.0223064; SanitizeDuration: 00:00:00
1:04:27 PM - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True].
1:04:27 PM - ClearAzureRmContext end processing.
1:04:27 PM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
1:04:27 PM - ConnectAzureRmAccountCommand begin processing with ParameterSet 'UserWithSubscriptionId'.
1:04:27 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [Az.Accounts], Cmdlet = [Connect-AzAccount]. Returning default value [True].
1:04:27 PM - [ConfigManager] Got nothing from [DefaultSubscriptionForLogin], Module = [], Cmdlet = []. Returning default value [].
1:04:27 PM - Autosave setting from startup session: 'CurrentUser'
1:04:27 PM - No autosave setting detected in environment variable 'AzContextAutoSave'.
1:04:27 PM - Using Autosave scope 'CurrentUser'
"1:04:27 PM - Unable to acquire token for tenant 'organizations' with error 'System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1 Azure.Identity.InteractiveBrowserCredential.AuthenticateAsync(Azure.Core.TokenRequestContext, System.Threading.CancellationToken)'.
at Microsoft.Azure.PowerShell.Authenticators.InteractiveWamAuthenticator.Authenticate(AuthenticationParameters parameters, CancellationToken cancellationToken)
at Microsoft.Azure.Commands.Common.Authentication.DelegatingAuthenticator.TryAuthenticate(AuthenticationParameters parameters, CancellationToken cancellationToken, Task`1& token)
at Microsoft.Azure.Commands.Common.Authentication.DelegatingAuthenticator.TryAuthenticate(AuthenticationParameters parameters, Task`1& token)
at Microsoft.Azure.Commands.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzureAccount account, IAzureEnvironment environment, String tenant, SecureString password, String promptBehavior, Action`1 promptAction, IAzureTokenCache tokenCache, String resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.AcquireAccessToken(IAzureAccount account, IAzureEnvironment environment, String tenantId, SecureString password, String promptBehavior, Action`1 promptAction, String resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.ListAccountTenants(IAzureAccount account, IAzureEnvironment environment, SecureString password, String promptBehavior, Action`1 promptAction)'"
1:04:27 PM - [ConfigManager] Got nothing from [EnableErrorRecordsPersistence], Module = [Az.Accounts], Cmdlet = [Connect-AzAccount]. Returning default value [False].
1:04:27 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [Az.Accounts], Cmdlet = [Connect-AzAccount]. Returning default value [True].
1:04:27 PM - [ConfigManager] Got nothing from [LoginExperienceV2], Module = [], Cmdlet = []. Returning default value [On].
1:04:27 PM - [ConfigManager] Got [True] from [EnableLoginByWam], Module = [], Cmdlet = [].
1:04:27 PM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
1:04:27 PM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
AzureQoSEvent: Module: Az.Accounts:4.0.2; CommandName: Connect-AzAccount; PSVersion: 7.5.0; IsSuccess: False; Duration: 00:00:00.0053855; SanitizeDuration: 00:00:00; Exception: Method not found: 'System.Threading.Tasks.Task`1 Azure.Identity.InteractiveBrowserCredential.AuthenticateAsync(Azure.Core.TokenRequestContext, System.Threading.CancellationToken)'.;
1:04:27 PM - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True].
1:04:27 PM - ConnectAzureRmAccountCommand end processing.
```

### Environment data

```PowerShell
Name Value
---- -----
PSVersion 7.5.0
PSEdition Core
GitCommitId 7.5.0
OS Microsoft Windows 10.0.14393
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```

### Module versions

```PowerShell
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 4.0.2 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzConte…

PS C:\Windows\System32> get-Module -ListAvailable | Where-Object {$_.Name -like "Az*"}

Directory: C:\Users\user\Documents\PowerShell\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 13.3.0 Az Core,Desk
Script 4.0.2 Az.Accounts Core,Desk {Disable-AzDataCollection, Disable-AzCo…
Script 4.0.0 Az.Accounts Core,Desk {Disable-AzDataCollection, Disable-AzCo…

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 2.1.0 Az.Advisor Core,Desk {Disable-AzAdvisorRecommendation, Enabl…
Script 6.1.0 Az.Aks Core,Desk {Disable-AzAksAddOn, Enable-AzAksAddOn,…
Script 1.2.0 Az.AnalysisServices Core,Desk {Add-AzAnalysisServicesAccount, Export-…
Script 4.1.0 Az.ApiManagement Core,Desk {Add-AzApiManagementApiToGateway, Add-A…
Script 2.0.1 Az.App Core,Desk {Disable-AzContainerAppRevision, Enable…
Script 1.4.0 Az.AppConfiguration Core,Desk {Clear-AzAppConfigurationDeletedStore, …
Script 2.3.0 Az.ApplicationInsights Core,Desk {Get-AzApplicationInsights, Get-AzAppli…
Script 1.1.0 Az.ArcResourceBridge Core,Desk {Get-AzArcResourceBridge, Get-AzArcReso…
Script 2.1.0 Az.Attestation Core,Desk {Add-AzAttestationPolicySigner, Get-AzA…
Script 1.1.0 Az.Automanage Core,Desk {Get-AzAutomanageBestPractice, Get-AzAu…
Script 1.11.1 Az.Automation Core,Desk {Export-AzAutomationDscConfiguration, E…
Script 3.7.0 Az.Batch Core,Desk {Disable-AzBatchAutoScale, Disable-AzBa…
Script 2.2.0 Az.Billing Core,Desk {Get-AzBillingAccount, Get-AzBillingInv…
Script 3.3.0 Az.Cdn Core,Desk {Clear-AzCdnEndpointContent, Clear-AzFr…
Script 2.1.0 Az.CloudService Core,Desk {Get-AzCloudService, Get-AzCloudService…
Script 1.15.0 Az.CognitiveServices Core,Desk {Add-AzCognitiveServicesAccountNetworkR…
Script 9.1.0 Az.Compute Core,Desk {Add-AzImageDataDisk, Add-AzVhd, Add-Az…
Script 1.1.0 Az.ConfidentialLedger Core,Desk {Get-AzConfidentialLedger, New-AzConfid…
Script 1.1.1 Az.ConnectedMachine Core,Desk {Connect-AzConnectedMachine, Get-AzConn…
Script 4.1.1 Az.ContainerInstance Core,Desk {Add-AzContainerInstanceOutput, Get-AzC…
Script 4.3.0 Az.ContainerRegistry Core,Desk {Connect-AzContainerRegistry, Get-AzCon…
Script 1.17.0 Az.CosmosDB Core,Desk {Get-AzCosmosDBAccount, Get-AzCosmosDBA…
Script 1.2.1 Az.DataBoxEdge Core,Desk {Get-AzDataBoxEdgeBandwidthSchedule, Ge…
Script 1.10.0 Az.Databricks Core,Desk {Get-AzDatabricksAccessConnector, Get-A…
Script 1.19.1 Az.DataFactory Core,Desk {Add-AzDataFactoryV2DataFlowDebugSessio…
Script 1.1.0 Az.DataLakeAnalytics Core,Desk {Add-AzDataLakeAnalyticsDataSource, Add…
Script 1.4.0 Az.DataLakeStore Core,Desk {Add-AzDataLakeStoreFirewallRule, Add-A…
Script 2.6.1 Az.DataProtection Core,Desk {Backup-AzDataProtectionBackupInstanceA…
Script 1.1.1 Az.DataShare Core,Desk {Get-AzDataShare, Get-AzDataShareAccoun…
Script 5.4.1 Az.DesktopVirtualization Core,Desk {Disconnect-AzWvdUserSession, Expand-Az…
Script 2.0.1 Az.DevCenter Core,Desk {Connect-AzDevCenterAdminCatalog, Conne…
Script 1.1.0 Az.DevTestLabs Core,Desk {Get-AzDtlAllowedVMSizesPolicy, Get-AzD…
Script 1.3.1 Az.Dns Core,Desk {Add-AzDnsRecordConfig, Get-AzDnsRecord…
Script 1.1.1 Az.DnsResolver Core,Desk {Get-AzDnsForwardingRuleset, Get-AzDnsF…
Script 1.2.1 Az.ElasticSan Core,Desk {Add-AzElasticSanVolumeGroupNetworkRule…
Script 2.2.0 Az.EventGrid Core,Desk {Disable-AzEventGridPartnerTopic, Enabl…
Script 5.2.0 Az.EventHub Core,Desk {New-AzEventHubAuthorizationRuleSASToke…
Script 1.12.0 Az.FrontDoor Core,Desk {Disable-AzFrontDoorCustomDomainHttps, …
Script 4.2.0 Az.Functions Core,Desk {Get-AzFunctionApp, Get-AzFunctionAppAv…
Script 6.3.1 Az.HDInsight Core,Desk {Add-AzHDInsightClusterIdentity, Add-Az…
Script 2.1.0 Az.HealthcareApis Core,Desk {Get-AzHealthcareApisService, Get-AzHea…
Script 1.0.0 Az.HealthDataAIServices Core,Desk {Get-AzDeidService, New-AzDeidService, …
Script 2.8.0 Az.IotHub Core,Desk {Add-AzIotHubCertificate, Add-AzIotHubC…
Script 6.3.1 Az.KeyVault Core,Desk {Add-AzKeyVaultCertificate, Add-AzKeyVa…
Script 2.4.0 Az.Kusto Core,Desk {Add-AzKustoClusterCalloutPolicy, Add-A…
Script 1.1.0 Az.LoadTesting Core,Desk {Get-AzLoad, New-AzLoad, Remove-AzLoad,…
Script 1.6.0 Az.LogicApp Core,Desk {Get-AzIntegrationAccount, Get-AzIntegr…
Script 1.2.0 Az.MachineLearning Core,Desk {Add-AzMlWebServiceRegionalProperty, Ex…
Script 1.2.0 Az.MachineLearningServices Core,Desk {Get-AzMLServiceQuota, Get-AzMLServiceU…
Script 1.5.1 Az.Maintenance Core,Desk {Get-AzApplyUpdate, Get-AzConfiguration…
Script 1.3.0 Az.ManagedServiceIdentity Core,Desk {Get-AzFederatedIdentityCredential, Get…
Script 3.1.0 Az.ManagedServices Core,Desk {Get-AzManagedServicesAssignment, Get-A…
Script 2.1.0 Az.MarketplaceOrdering Core,Desk {Get-AzMarketplaceTerms, Invoke-AzMarke…
Script 1.2.0 Az.Media Core,Desk {Get-AzMediaService, Get-AzMediaService…
Script 2.7.0 Az.Migrate Core,Desk {Get-AzMigrateDiscoveredServer, Get-AzM…
Script 6.0.1 Az.Monitor Core,Desk {Add-AzLogProfile, Add-AzMetricAlertRul…
Script 1.3.0 Az.MySql Core,Desk {Get-AzMySqlConfiguration, Get-AzMySqlC…
Script 7.14.0 Az.Network Core,Desk {Add-AzApplicationGatewayAuthentication…
Script 1.1.0 Az.NetworkCloud Core,Desk {Deploy-AzNetworkCloudCluster, Disable-…
Script 1.2.0 Az.Nginx Core,Desk {Get-AzNginxCertificate, Get-AzNginxCon…
Script 1.2.0 Az.NotificationHubs Core,Desk {Get-AzNotificationHub, Get-AzNotificat…
Script 3.3.0 Az.OperationalInsights Core,Desk {Disable-AzOperationalInsightsIISLogCol…
Script 1.1.0 Az.Oracle Core,Desk {Add-AzOracleCloudVMClusterVM, Get-AzOr…
Script 1.7.1 Az.PolicyInsights Core,Desk {Get-AzPolicyAttestation, Get-AzPolicyE…
Script 1.2.0 Az.PostgreSql Core,Desk {Get-AzPostgreSqlConfiguration, Get-AzP…
Script 2.1.0 Az.PowerBIEmbedded Core,Desk {Get-AzPowerBIEmbeddedCapacity, New-AzP…
Script 1.2.0 Az.PrivateDns Core,Desk {Add-AzPrivateDnsRecordConfig, Get-AzPr…
Script 7.5.1 Az.RecoveryServices Core,Desk {Add-AzRecoveryServicesAsrReplicationPr…
Script 1.11.0 Az.RedisCache Core,Desk {Export-AzRedisCache, Get-AzRedisCache,…
Script 1.4.1 Az.RedisEnterpriseCache Core,Desk {Export-AzRedisEnterpriseCache, Get-AzR…
Script 2.1.0 Az.Relay Core,Desk {Get-AzRelayAuthorizationRule, Get-AzRe…
Script 1.2.0 Az.ResourceGraph Core,Desk {Search-AzGraph, Get-AzResourceGraphQue…
Script 1.3.0 Az.ResourceMover Core,Desk {Add-AzResourceMoverMoveResource, Get-A…
Script 7.9.0 Az.Resources Core,Desk {Export-AzResourceGroup, Export-AzTempl…
Script 1.8.0 Az.Security Core,Desk {Add-AzSecurityAdaptiveNetworkHardening…
Script 3.2.0 Az.SecurityInsights Core,Desk {Get-AzSentinelAlertRule, Get-AzSentine…
Script 4.1.1 Az.ServiceBus Core,Desk {New-AzServiceBusAuthorizationRuleSASTo…
Script 3.5.0 Az.ServiceFabric Core,Desk {Add-AzServiceFabricClientCertificate, …
Script 2.1.0 Az.SignalR Core,Desk {Get-AzSignalR, Get-AzSignalRKey, Get-A…
Script 6.0.2 Az.Sql Core,Desk {Add-AzSqlDatabaseToFailoverGroup, Add-…
Script 2.4.0 Az.SqlVirtualMachine Core,Desk {Assert-AzSqlVMEntraAuth, Get-AzAvailab…
Script 2.5.0 Az.StackHCI Core,Desk {Add-AzStackHCIVMAttestation, Disable-A…
Script 1.1.0 Az.StackHCIVM Core,Desk {Add-AzStackHCIVMVirtualMachineDataDisk…
Script 8.2.0 Az.Storage Core,Desk {Add-AzRmStorageContainerLegalHold, Add…
Script 1.5.0 Az.StorageMover Core,Desk {Get-AzStorageMover, Get-AzStorageMover…
Script 2.4.1 Az.StorageSync Core,Desk {Get-AzStorageSyncCloudEndpoint, Get-Az…
Script 2.1.0 Az.StreamAnalytics Core,Desk {Get-AzStreamAnalyticsCluster, Get-AzSt…
Script 2.1.0 Az.Support Core,Desk {Get-AzSupportChatTranscript, Get-AzSup…
Script 3.1.2 Az.Synapse Core,Desk {Add-AzSynapseDataFlowDebugSessionPacka…
Script 1.3.0 Az.TrafficManager Core,Desk {Add-AzTrafficManagerCustomHeaderToEndp…
Script 3.3.1 Az.Websites Core,Desk {Add-AzWebAppAccessRestrictionRule, Add…
Script 1.0.0 Az.Workloads Core,Desk {Get-AzWorkloadsMonitor, Get-AzWorkload…
Script 4.2.1 Azure.Storage Desk {Get-AzureStorageTable, New-AzureStorag…
```

### Error output

```PowerShell
Method not found: 'System.Threading.Tasks.Task`1 Azure.Identity.InteractiveBrowserCredential.AuthenticateAsync(Azure.Core.TokenRequestContext, System.Threading.CancellationToken)'.
at Microsoft.Azure.PowerShell.Authenticators.InteractiveWamAuthenticator.Authenticate(AuthenticationParameters parameters, CancellationToken cancellationToken)
at Microsoft.Azure.Commands.Common.Authentication.DelegatingAuthenticator.TryAuthenticate(AuthenticationParameters parameters, CancellationToken cancellationToken, Task`1& token)
at Microsoft.Azure.Commands.Common.Authentication.DelegatingAuthenticator.TryAuthenticate(AuthenticationParameters parameters, Task`1& token)
at Microsoft.Azure.Commands.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzureAccount account, IAzureEnvironment environment, String tenant, SecureString password, String promptBehavior, Action`1 promptAction, IAzureTokenCache tokenCache, String resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.AcquireAccessToken(IAzureAccount account, IAzureEnvironment environment, String tenantId, SecureString password, String promptBehavior, Action`1 promptAction, String resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.ListAccountTenants(IAzureAccount account, IAzureEnvironment environment, SecureString password, String promptBehavior, Action`1 promptAction)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account, IAzureEnvironment environment, String tenantIdOrName, String subscriptionId, String subscriptionName, SecureString password, Boolean skipValidation, IOpenIDConfiguration openIDConfigDoc, Action`1 promptAction, String name, Boolean shouldPopulateContextList, Int32 maxContextPopulation, String authScope, Boolean IsInteractiveContextSelectionEnabled)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass134_2.b__7()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass134_1.b__1(AzureRmProfile localProfile, RMProfileClient profileClient, String name)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass150_0.b__0(AzureRmProfile prof, RMProfileClient client)
at Microsoft.Azure.Commands.Profile.Common.AzureContextModificationCmdlet.ModifyContext(Action`2 contextAction)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.SetContextWithOverwritePrompt(Action`3 setContextAction)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.b__3_0(T c)
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor)
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing Connect-AzAccount from the C# host using Microsoft.Powershell.SDK, Az.Accounts 4.0.2, and the reported .NET 9 environment, then compare it with standalone PowerShell 7. Check the reported Azure.Identity InteractiveBrowserCredential.AuthenticateAsync MissingMethodException and the service-account entry-point error. Done means authentication works from the host without these errors and the interactive browser login opens.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, powershell
Domain
authentication, cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.