Azure / Azure/azure-powershell

Export-AzSshConfig does not seem to work as expected

Open
#21,439 10 comments 0 reactions 0 assignees View on GitHub
customer-reported question
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

### Description

Export-AzSshConfig generates the message "No account or login hint was passed to the AcquireTokenSilent call" and does not seem to work as expected.

What I tried in a clean PS session:
Import-Module -Name 'Az.Ssh'
Connect-AzAccount
Export-AzSshConfig -ResourceGroupName '' -Name '' -ConfigFilePath '~/.ssh/export-test'

What I expected:
A similar session as what the Azure CLI produces with 'az login' and 'az ssh config'. When I use the CLI commands I get a SSH key files and the configuration.

What works:
The Azure CLI commands to achieve the same goal ('az login' and 'az ssh config') do work and I use the same Resource Group and VM name, so I know that the rights are set and items exist. It is just the PS variant seems to face an issue.

What I got from the Azure CLI commands was 4 files, 1 private key, 1 public key, 1 aadcert public key and the configuration file.
What I got from the PS command 'Export-AzSshConfig' was 2 files, 1 private and 1 public file.

### Script or Debug output

```PowerShell
DEBUG: 12:47:44 - ExportAzSshConfig begin processing with ParameterSet 'Interactive'.
DEBUG: 12:47:44 - using account id '[ACCOUNT_ID]'...
DEBUG: 12:47:44 - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: [Common.Authentication]: Authenticating using Account: 'sspierenburg@inneo.com', environment: 'AzureCloud', tenant: '[TENANT_ID]'
DEBUG: 12:47:44 - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 12:47:44 - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'[TENANT_ID]', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'sspierenburg@inneo.com'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 87e39a34-021a-4289-bff7-c64c90038263] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 87e39a34-021a-4289-bff7-c64c90038263] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 87e39a34-021a-4289-bff7-c64c90038263] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 87e39a34-021a-4289-bff7-c64c90038263] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 87e39a34-021a-4289-bff7-c64c90038263] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(04963809-4800-47df-9a30-1a8fe9a92c88)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 04963809-4800-47df-9a30-1a8fe9a92c88
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:

DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] === Token Acquisition (SilentRequest) started:
Scopes: https://management.core.windows.net//.default
Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] Access token is not expired. Returning the found cache entry. [Current time (04/04/2023 10:47:44) - Expiration Time (04/04/2023 11:59:04 +00:00) - Extended Expiration Time (04/04/2023 11:59:04 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:44Z - 04963809-4800-47df-9a30-1a8fe9a92c88] AT expiration time: 04/04/2023 11:59:04 +00:00, scopes: https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default. source: Cache
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2023-04-04T11:59:04.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '[TENANT_ID]', UserId: 'sspierenburg@inneo.com'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/resources?$filter=name eq '[VM_NAME]' and (resourceType eq 'Microsoft.HybridCompute/machines' or resourceType eq 'Microsoft.Compute/virtualMachines' or resourceType eq 'Microsoft.ConnectedVMwarevSphere/virtualMachines' or resourceType eq 'Microsoft.ScVmm/virtualMachines' or resourceType eq 'Microsoft.AzureStackHCI/virtualMachines')&api-version=2018-05-01

Headers:
Accept-Language : en-US
x-ms-client-request-id : 4f4cda7c-2c0b-4203-a44a-75ebda0b9321

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control : no-cache
Pragma : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-request-id : b2be1577-aa7f-4434-8c2a-5ef7fac455eb
x-ms-correlation-request-id : b2be1577-aa7f-4434-8c2a-5ef7fac455eb
x-ms-routing-request-id : WESTEUROPE:20230404T104745Z:b2be1577-aa7f-4434-8c2a-5ef7fac455eb
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Date : Tue, 04 Apr 2023 10:47:45 GMT

Body:
{
"value": [
{
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Compute/virtualMachines/[VM_NAME]",
"name": "[VM_NAME]",
"type": "Microsoft.Compute/virtualMachines",
"location": "westeurope",
"identity": {
"principalId": "[PRINCIPAL_ID]",
"tenantId": "[TENANT_ID]",
"type": "SystemAssigned"
}
}
]
}

DEBUG: [Common.Authentication]: Authenticating using Account: 'sspierenburg@inneo.com', environment: 'AzureCloud', tenant: '[TENANT_ID]'
DEBUG: 12:47:45 - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 12:47:45 - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'[TENANT_ID]', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'sspierenburg@inneo.com'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - de862541-c93c-4e0e-b5e7-0710808fe948] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - de862541-c93c-4e0e-b5e7-0710808fe948] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - de862541-c93c-4e0e-b5e7-0710808fe948] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - de862541-c93c-4e0e-b5e7-0710808fe948] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - de862541-c93c-4e0e-b5e7-0710808fe948] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(1d2f9bea-960f-4091-a57e-1aea9ce6dece)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 1d2f9bea-960f-4091-a57e-1aea9ce6dece
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:

DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] === Token Acquisition (SilentRequest) started:
Scopes: https://management.core.windows.net//.default
Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] Access token is not expired. Returning the found cache entry. [Current time (04/04/2023 10:47:45) - Expiration Time (04/04/2023 11:59:04 +00:00) - Extended Expiration Time (04/04/2023 11:59:04 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 1d2f9bea-960f-4091-a57e-1aea9ce6dece] AT expiration time: 04/04/2023 11:59:04 +00:00, scopes: https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default. source: Cache
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2023-04-04T11:59:04.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '[TENANT_ID]', UserId: 'sspierenburg@inneo.com'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Compute/virtualMachines/[VM_NAME]?api-version=2022-03-01

Headers:
Accept-Language : en-US
x-ms-client-request-id : 4f4cda7c-2c0b-4203-a44a-75ebda0b9321

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control : no-cache
Pragma : no-cache
x-ms-ratelimit-remaining-resource: Microsoft.Compute/LowCostGet3Min;3998,Microsoft.Compute/LowCostGet30Min;31995
Strict-Transport-Security : max-age=31536000; includeSubDomains
x-ms-request-id : 77c99a41-673d-49ae-aa32-e50dad67e0f9
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-correlation-request-id : 2401d5df-218b-4521-aec0-e8bacb90f5ba
x-ms-routing-request-id : WESTEUROPE:20230404T104745Z:2401d5df-218b-4521-aec0-e8bacb90f5ba
X-Content-Type-Options : nosniff
Date : Tue, 04 Apr 2023 10:47:44 GMT

Body:
{
"name": "[VM_NAME]",
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Compute/virtualMachines/[VM_NAME]",
"type": "Microsoft.Compute/virtualMachines",
"location": "westeurope",
"identity": {
"type": "SystemAssigned",
"principalId": "[PRINCIPAL_ID]",
"tenantId": "[TENANT_ID]"
},
"properties": {
"vmId": "2bf0f4ea-23ce-4939-a751-bc886e0cfb5a",
"hardwareProfile": {
"vmSize": "Standard_B2s"
},
"storageProfile": {
"imageReference": {
"publisher": "debian",
"offer": "debian-11",
"sku": "11-backports-gen2",
"version": "latest",
"exactVersion": "0.20221219.1234"
},
"osDisk": {
"osType": "Linux",
"name": "[VM_NAME]_OsDisk_1_47c1dda1b6ff4ca98cdc575c8a74c14b",
"createOption": "FromImage",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Premium_LRS",
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Compute/disks/[VM_NAME]_OsDisk_1_47c1dda1b6ff4ca98cdc575c8a74c14b"
},
"deleteOption": "Delete",
"diskSizeGB": 30
},
"dataDisks": []
},
"osProfile": {
"computerName": "[VM_NAME]",
"adminUsername": "mweishaar",
"linuxConfiguration": {
"disablePasswordAuthentication": true,
"ssh": {
"publicKeys": [
{
"path": "/home/mweishaar/.ssh/authorized_keys",
"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDG1HNEAwPX4b8Ge9wVEAUmC8w6eaJBXCJ7D8YJGYrdUJgHy5WIKhGnadNLIUduYk9p2k/TmgDC6/JaI31fQoZS2XZfnUlIkF4YkquCkHCbxPHVmPm8gTw7mI7IFmLi4KflzWg+Hw/fpFht9B/OJ0JMAWei/TdSVx5vnA0kWy+FqATcIF4hBZOoxnWsPd4+GLjkLokCnebWPwB4f2sOPgeiZUkckCTtZLH0A7ksI6ieGGgJ/+VgfH8Gmgm7NJdZRbAbw+TV0HCapXlafAKpgviS9slhaPG/p7z6E7RfyXJ/mRrSQu2P51/zcj0BqB75pXPgEsrd69sJrlA1V0kvDWxH busch@workstation.home.datenschleuder.com"
}
]
},
"provisionVMAgent": true,
"patchSettings": {
"patchMode": "ImageDefault",
"assessmentMode": "ImageDefault"
},
"enableVMAgentPlatformUpdates": false
},
"secrets": [],
"allowExtensionOperations": true,
"requireGuestProvisionSignal": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Network/networkInterfaces/[VM_NAME]830"
}
]
},
"provisioningState": "Succeeded",
"timeCreated": "2023-03-29T14:27:04.5515084+02:00"
},
"resources": [
{
"name": "AADSSHLoginForLinux",
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Compute/virtualMachines/[VM_NAME]/extensions/AADSSHLoginForLinux",
"type": "Microsoft.Compute/virtualMachines/extensions",
"location": "westeurope",
"properties": {
"autoUpgradeMinorVersion": true,
"provisioningState": "Succeeded",
"publisher": "Microsoft.Azure.ActiveDirectory",
"type": "AADSSHLoginForLinux",
"typeHandlerVersion": "1.0"
}
}
]
}

DEBUG: [Common.Authentication]: Authenticating using Account: 'sspierenburg@inneo.com', environment: 'AzureCloud', tenant: '[TENANT_ID]'
DEBUG: 12:47:45 - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 12:47:45 - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'[TENANT_ID]', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'sspierenburg@inneo.com'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 2a9974ad-0c18-4a11-b2ee-b738e3044550] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 2a9974ad-0c18-4a11-b2ee-b738e3044550] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 2a9974ad-0c18-4a11-b2ee-b738e3044550] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 2a9974ad-0c18-4a11-b2ee-b738e3044550] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 2a9974ad-0c18-4a11-b2ee-b738e3044550] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(3fbf6787-0837-4b2e-a8c9-109211bde0e3)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 3fbf6787-0837-4b2e-a8c9-109211bde0e3
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:

DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] === Token Acquisition (SilentRequest) started:
Scopes: https://management.core.windows.net//.default
Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] Access token is not expired. Returning the found cache entry. [Current time (04/04/2023 10:47:45) - Expiration Time (04/04/2023 11:59:04 +00:00) - Extended Expiration Time (04/04/2023 11:59:04 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 [2023-04-04 10:47:45Z - 3fbf6787-0837-4b2e-a8c9-109211bde0e3] AT expiration time: 04/04/2023 11:59:04 +00:00, scopes: https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default. source: Cache
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2023-04-04T11:59:04.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '[TENANT_ID]', UserId: 'sspierenburg@inneo.com'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Network/networkInterfaces/[VM_NAME]830?api-version=2021-08-01

Headers:
Accept-Language : en-US
x-ms-client-request-id : 4f4cda7c-2c0b-4203-a44a-75ebda0b9321

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control : no-cache
Pragma : no-cache
ETag : W/"23716eb1-936a-4b2a-a682-cda853773ead"
x-ms-request-id : 740ea54b-7c3c-4bd5-9473-4dbdb69671ba
x-ms-correlation-request-id : dcefabed-85b8-4b06-897e-abb441aebcee
x-ms-arm-service-request-id : 3213cbeb-e278-481b-bbdd-d819e1251595
Strict-Transport-Security : max-age=31536000; includeSubDomains
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-routing-request-id : WESTEUROPE:20230404T104745Z:dcefabed-85b8-4b06-897e-abb441aebcee
X-Content-Type-Options : nosniff
Date : Tue, 04 Apr 2023 10:47:45 GMT

Body:
{
"name": "[VM_NAME]830",
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Network/networkInterfaces/[VM_NAME]830",
"etag": "W/\"23716eb1-936a-4b2a-a682-cda853773ead\"",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "1867afa9-1df1-4c4f-80f8-0294c83d580a",
"ipConfigurations": [
{
"name": "ipconfig1",
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Network/networkInterfaces/[VM_NAME]830/ipConfigurations/ipconfig1",
"etag": "W/\"23716eb1-936a-4b2a-a682-cda853773ead\"",
"type": "Microsoft.Network/networkInterfaces/ipConfigurations",
"properties": {
"provisioningState": "Succeeded",
"privateIPAddress": "10.120.2.9",
"privateIPAllocationMethod": "Static",
"publicIPAddress": {
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Network/publicIPAddresses/[VM_NAME]-publicip"
},
"subnet": {
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/RG-ICS-WE-BASE/providers/Microsoft.Network/virtualNetworks/VNET-WE-01/subnets/VNET-WE-01-Server"
},
"primary": true,
"privateIPAddressVersion": "IPv4"
}
}
],
"dnsSettings": {
"dnsServers": [],
"appliedDnsServers": [],
"internalDomainNameSuffix": "ssjiojio2q5u3jgarcxiw0chac.ax.internal.cloudapp.net"
},
"macAddress": "60-45-BD-9B-E7-D6",
"enableAcceleratedNetworking": false,
"vnetEncryptionSupported": false,
"enableIPForwarding": false,
"networkSecurityGroup": {
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Network/networkSecurityGroups/[VM_NAME]-nsg"
},
"primary": true,
"virtualMachine": {
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Compute/virtualMachines/[VM_NAME]"
},
"hostedWorkloads": [],
"tapConfigurations": [],
"nicType": "Standard"
},
"type": "Microsoft.Network/networkInterfaces",
"location": "westeurope",
"kind": "Regular"
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Network/publicIPAddresses/[VM_NAME]-publicip?api-version=2021-08-01

Headers:
Accept-Language : en-US
x-ms-client-request-id : 4f4cda7c-2c0b-4203-a44a-75ebda0b9321

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control : no-cache
Pragma : no-cache
ETag : W/"e1bb4916-7e10-4ae4-9add-eeda0daa323e"
x-ms-request-id : 260c9391-3576-4e56-870d-34b0c40b624d
x-ms-correlation-request-id : 81b359ab-fa7f-4c9b-bbd5-4dbe59942c18
x-ms-arm-service-request-id : 68625295-d229-4a98-a68a-97c86e235c66
Strict-Transport-Security : max-age=31536000; includeSubDomains
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-routing-request-id : WESTEUROPE:20230404T104745Z:81b359ab-fa7f-4c9b-bbd5-4dbe59942c18
X-Content-Type-Options : nosniff
Date : Tue, 04 Apr 2023 10:47:45 GMT

Body:
{
"name": "[VM_NAME]-publicip",
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Network/publicIPAddresses/[VM_NAME]-publicip",
"etag": "W/\"e1bb4916-7e10-4ae4-9add-eeda0daa323e\"",
"location": "westeurope",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "cac41f2e-a39a-4a6e-88f4-2315859e8d82",
"ipAddress": "[IP_ADDRESS]",
"publicIPAddressVersion": "IPv4",
"publicIPAllocationMethod": "Static",
"idleTimeoutInMinutes": 4,
"ipTags": [],
"ipConfiguration": {
"id": "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/[RG_ID]/providers/Microsoft.Network/networkInterfaces/[VM_NAME]830/ipConfigurations/ipconfig1"
}
},
"type": "Microsoft.Network/publicIPAddresses",
"sku": {
"name": "Basic",
"tier": "Regional"
}
}

/Users/stevenspierenburg/.ssh/az_ssh_config/[RG_ID]-[VM_NAME]/id_rsa already exists. ]
DEBUG: 12:47:48 - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 12:47:48 - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True].
Export-AzSshConfig: No account or login hint was passed to the AcquireTokenSilent call.
DEBUG: 12:47:48 - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 12:47:48 - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: AzureQoSEvent: Module: Az.Ssh:0.1.1; CommandName: Export-AzSshConfig; PSVersion: 7.3.3; IsSuccess: False; Duration: 00:00:03.2349176; Exception: No account or login hint was passed to the AcquireTokenSilent call. ;
DEBUG: 12:47:48 - ExportAzSshConfig end processing.
```

### Environment data

```PowerShell
Name Value
---- -----
PSVersion 7.3.3
PSEdition Core
GitCommitId 7.3.3
OS Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792…
Platform Unix
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 2.12.0 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzConte…
Script 0.1.1 Az.Ssh {Enter-AzVM, Export-AzSshConfig}
```

### Error output

```PowerShell
Message : No account or login hint was passed to the AcquireTokenSilent call.
StackTrace : at Microsoft.Identity.Client.Internal.Requests.Silent.SilentRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.Silent.SilentRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.ApiConfig.Executors.ClientApplicationBaseExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenSilentParameters silentParameters, CancellationToken cancellationToken)
at Microsoft.Azure.Commands.Common.Authentication.Factories.SshCredentialFactory.GetSshCredential(IAzureContext context, RSAParameters rsaKeyInfo)
at Microsoft.Azure.Commands.Ssh.SshBaseCmdlet.GetAccessToken(String publicKeyFile)
at Microsoft.Azure.Commands.Ssh.SshBaseCmdlet.GetAndWriteCertificate(String publicKeyFile)
at Microsoft.Azure.Commands.Ssh.SshBaseCmdlet.PrepareAadCredentials(String credentialFolder)
at Microsoft.Azure.Commands.Ssh.ExportAzSshConfig.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()
Exception : Microsoft.Identity.Client.MsalUiRequiredException
InvocationInfo : {Export-AzSshConfig}
Line : Export-AzSshConfig -ResourceGroupName '[RG_NAME]' -Name '[VM_NAME]' -ConfigFilePath '~/.ssh/export-test'
Position : At line:1 char:1
+ Export-AzSshConfig -ResourceGroupName '[RG_NAME]' -Name '[VM_NAME]] …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 62
```

Contributor guide

Open the contributing guide

Research direction

Start at the Export-AzSshConfig cmdlet entry point and reproduce the clean-session sequence: Import-Module Az.Ssh, Connect-AzAccount, then Export-AzSshConfig with a resource group, VM name, and config path. Compare the generated files and authentication output with the Azure CLI result; done means the PowerShell command produces the expected SSH configuration and key files without the token error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.