Azure / Azure/azure-powershell
When piping Get-AzResource into Get-AzAutomationAccount for a named resource, an entry not matching the criteria is included
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
When attempting to retrieve a single Automation Account using `Get-AzResource` and pipe it into `Get-AzAutomationAccount`, two results are piped instead of one
_As an aside: from the debug output, it also looks like Get-AzResource ran twice with the same query and results_
### Issue script & Debug output
```PowerShell
Get-AzResource -Name 'DESIREDAUTOMATIONACCOUNT' -ResourceType Microsoft.Automation/automationAccounts | Get-AzAutomationAccount
DEBUG: 9:08:17 AM - GetAzureResourceCmdlet begin processing with ParameterSet 'ByTagNameValueParameterSet'.
DEBUG: 9:08:17 AM - using account id 'reader@contoso.com'...
DEBUG: 9:08:17 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 9:08:17 AM - GetAzureAutomationAccount begin processing with ParameterSet 'ByAll'.
DEBUG: 9:08:17 AM - using account id 'reader@contoso.com'...
DEBUG: 9:08:17 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: [Common.Authentication]: Authenticating using Account: 'reader@contoso.com', environment: 'AzureCloud', tenant: 'TENANTID'
DEBUG: 9:08:17 AM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'TENANTID', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'reader@contoso.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 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d6e66370-1c54-4b0d-8739-ff87a76874d7] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d6e66370-1c54-4b0d-8739-ff87a76874d7] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d6e66370-1c54-4b0d-8739-ff87a76874d7] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d6e66370-1c54-4b0d-8739-ff87a76874d7] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d6e66370-1c54-4b0d-8739-ff87a76874d7] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] [WamBroker] WAM supported OS.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] [WamBroker] ListWindowsWorkAndSchoolAccounts option was not enabled.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - e55f12ff-dfad-4241-8c39-43f763f3aa6c] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(de34f79b-fe7f-49c9-99b1-8f097ed24f31)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31]
=== 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 - True
HomeAccountId - False
CorrelationId - de34f79b-fe7f-49c9-99b1-8f097ed24f31
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] === 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 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] Access token is not expired. Returning the found cache entry. [Current time (03 / 29 / 2023 13:08:17) - Expiration Time (03 / 29 / 2023 14:09:38 +00:00) - Extended Expiration Time (03 / 29 / 2023 14:09:38 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] AT expiration time: 3/29/2023 2:09:38 PM +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-03-29T14:09:38.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'TENANTID', UserId: 'reader@contoso.com'
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/SUBSCRIPTIONID/resources?$filter=resourceType EQ 'Microsoft.Automation/automationAccounts'&api-version=2021-04-01
Headers:
Accept-Language : en-US
x-ms-client-request-id : d25d7aaa-36ae-4d98-9214-a1065935a11c
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 : 623451ea-cf2b-4c56-87af-8711d44797c8
x-ms-correlation-request-id : 623451ea-cf2b-4c56-87af-8711d44797c8
x-ms-routing-request-id : CANADACENTRAL:20230329T130817Z:623451ea-cf2b-4c56-87af-8711d44797c8
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Get-Date : Wed, 29 Mar 2023 13:08:17 GMT
Body:
{
'value': [
---Truncated 23 results---
{
'id': '/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP01/providers/Microsoft.Automation/automationAccounts/AUTOMATIONACCOUNT00',
'name': 'AUTOMATIONACCOUNT00',
'type': 'Microsoft.Automation/automationAccounts',
'location': 'eastus2',
'tags': {}
},
{
'id': '/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP01/providers/Microsoft.Automation/automationAccounts/DESIREDAUTOMATIONACCOUNT',
'name': 'DESIREDAUTOMATIONACCOUNT',
'type': 'Microsoft.Automation/automationAccounts',
'location': 'eastus2',
'identity': {
'principalId': 'PRINCIPALID',
'tenantId': 'TENANTID',
'type': 'SystemAssigned'
},
'tags': {}
}
]
}
DEBUG: [Common.Authentication]: Authenticating using Account: 'reader@contoso.com', environment: 'AzureCloud', tenant: 'TENANTID'
DEBUG: 9:08:17 AM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'TENANTID', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'reader@contoso.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 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d6e66370-1c54-4b0d-8739-ff87a76874d7] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d6e66370-1c54-4b0d-8739-ff87a76874d7] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d6e66370-1c54-4b0d-8739-ff87a76874d7] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d6e66370-1c54-4b0d-8739-ff87a76874d7] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d6e66370-1c54-4b0d-8739-ff87a76874d7] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] [WamBroker] WAM supported OS.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] [WamBroker] ListWindowsWorkAndSchoolAccounts option was not enabled.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - e55f12ff-dfad-4241-8c39-43f763f3aa6c] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(de34f79b-fe7f-49c9-99b1-8f097ed24f31)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31]
=== 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 - True
HomeAccountId - False
CorrelationId - de34f79b-fe7f-49c9-99b1-8f097ed24f31
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] === 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 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] Access token is not expired. Returning the found cache entry. [Current time (03 / 29 / 2023 13:08:17) - Expiration Time (03 / 29 / 2023 14:09:38 +00:00) - Extended Expiration Time (03 / 29 / 2023 14:09:38 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - de34f79b-fe7f-49c9-99b1-8f097ed24f31] AT expiration time: 3/29/2023 2:09:38 PM +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-03-29T14:09:38.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'TENANTID', UserId: 'reader@contoso.com'
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/SUBSCRIPTIONID/resources?$filter=resourceType EQ 'Microsoft.Automation/automationAccounts'&api-version=2021-04-01
Headers:
Accept-Language : en-US
x-ms-client-request-id : 0a5b874c-0229-4bf1-af7e-4a62d7373d4f
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 : 623451ea-cf2b-4c56-87af-8711d44797c8
x-ms-correlation-request-id : 623451ea-cf2b-4c56-87af-8711d44797c8
x-ms-routing-request-id : CANADACENTRAL:20230329T130817Z:623451ea-cf2b-4c56-87af-8711d44797c8
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Get-Date : Wed, 29 Mar 2023 13:08:17 GMT
Body:
{
'value': [
---Truncated 23 results---
{
'id': '/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP01/providers/Microsoft.Automation/automationAccounts/AUTOMATIONACCOUNT00',
'name': 'AUTOMATIONACCOUNT00',
'type': 'Microsoft.Automation/automationAccounts',
'location': 'eastus2',
'tags': {}
},
{
'id': '/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP01/providers/Microsoft.Automation/automationAccounts/DESIREDAUTOMATIONACCOUNT',
'name': 'DESIREDAUTOMATIONACCOUNT',
'type': 'Microsoft.Automation/automationAccounts',
'location': 'eastus2',
'identity': {
'principalId': 'PRINCIPALID',
'tenantId': 'TENANTID',
'type': 'SystemAssigned'
},
'tags': {}
}
]
}
DEBUG: [Common.Authentication]: Authenticating using Account: 'reader@contoso.com', environment: 'AzureCloud', tenant: 'TENANTID'
DEBUG: 9:08:17 AM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'TENANTID', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'reader@contoso.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 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d1b6339e-881f-4ccb-a360-c9697090c743] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d1b6339e-881f-4ccb-a360-c9697090c743] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d1b6339e-881f-4ccb-a360-c9697090c743] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d1b6339e-881f-4ccb-a360-c9697090c743] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d1b6339e-881f-4ccb-a360-c9697090c743] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] [WamBroker] WAM supported OS.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] [WamBroker] ListWindowsWorkAndSchoolAccounts option was not enabled.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 0cf904d5-80a4-4812-9ade-53b0fe5be458] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(5b06a50e-10f0-491a-8af1-5bd4a0107045)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045]
=== 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 - True
HomeAccountId - False
CorrelationId - 5b06a50e-10f0-491a-8af1-5bd4a0107045
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] === 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 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] Access token is not expired. Returning the found cache entry. [Current time (03 / 29 / 2023 13:08:17) - Expiration Time (03 / 29 / 2023 14:09:38 +00:00) - Extended Expiration Time (03 / 29 / 2023 14:09:38 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] AT expiration time: 3/29/2023 2:09:38 PM +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-03-29T14:09:38.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'TENANTID', UserId: 'reader@contoso.com'
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP01/providers/Microsoft.Automation/automationAccounts?api-version=2022-08-08
Headers:
Accept-Language : en-US
x-ms-client-request-id : 0a5b874c-0229-4bf1-af7e-4a62d7373d4f
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Cache-Control : no-cache
Pragma : no-cache
x-ms-request-id : 0a5b874c-0229-4bf1-af7e-4a62d7373d4f
Server : Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11994
x-ms-correlation-request-id : d5540606-a78a-4597-a0dc-5ff0d1f5434e
x-ms-routing-request-id : CANADACENTRAL:20230329T130818Z:d5540606-a78a-4597-a0dc-5ff0d1f5434e
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Get-Date : Wed, 29 Mar 2023 13:08:17 GMT
Body:
{
'value': [
{
'id': '/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP01/providers/Microsoft.Automation/automationAccounts/AUTOMATIONACCOUNT00',
'location': 'eastus2',
'name': 'AUTOMATIONACCOUNT00',
'type': 'Microsoft.Automation/AutomationAccounts',
'tags': {},
'properties': {
'creationTime': '2022-06-24T15:56:53.997-04:00',
'lastModifiedTime': '2022-10-30T15:11:38.333-04:00',
'state': 'Ok'
}
},
{
'id': '/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP01/providers/Microsoft.Automation/automationAccounts/DESIREDAUTOMATIONACCOUNT',
'location': 'eastus2',
'name': 'DESIREDAUTOMATIONACCOUNT',
'type': 'Microsoft.Automation/AutomationAccounts',
'tags': {},
'properties': {
'creationTime': '2017-07-17T14:36:25.027-04:00',
'lastModifiedTime': '2023-01-24T11:42:48.883-05:00',
'state': 'Ok'
},
'identity': {
'type': 'systemassigned',
'principalId': 'PRINCIPALID',
'tenantId': 'TENANTID'
}
}
]
}
SubscriptionId : SUBSCRIPTIONID
ResourceGroupName : RESOURCEGROUP01
AutomationAccountName : AUTOMATIONACCOUNT00
Get-Location : eastus2
State : Ok
Plan :
CreationTime : 6/24/2022 3:56:53 PM -04:00
LastModifiedTime : 10/30/2022 3:11:38 PM -04:00
LastModifiedBy :
Tags : {}
Identity :
Encryption :
PublicNetworkAccess :
SubscriptionId : SUBSCRIPTIONID
ResourceGroupName : RESOURCEGROUP01
AutomationAccountName : DESIREDAUTOMATIONACCOUNT
Get-Location : eastus2
State : Ok
Plan :
CreationTime : 7/17/2017 2:36:25 PM -04:00
LastModifiedTime : 1/24/2023 11:42:48 AM -05:00
LastModifiedBy :
Tags : {}
Identity : Microsoft.Azure.Management.Automation.Models.Identity
Encryption :
PublicNetworkAccess :
DEBUG: [Common.Authentication]: Authenticating using Account: 'reader@contoso.com', environment: 'AzureCloud', tenant: 'TENANTID'
DEBUG: 9:08:17 AM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'TENANTID', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'reader@contoso.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 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d1b6339e-881f-4ccb-a360-c9697090c743] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d1b6339e-881f-4ccb-a360-c9697090c743] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d1b6339e-881f-4ccb-a360-c9697090c743] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d1b6339e-881f-4ccb-a360-c9697090c743] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - d1b6339e-881f-4ccb-a360-c9697090c743] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] [WamBroker] WAM supported OS.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] [WamBroker] ListWindowsWorkAndSchoolAccounts option was not enabled.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 0cf904d5-80a4-4812-9ade-53b0fe5be458] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(5b06a50e-10f0-491a-8af1-5bd4a0107045)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045]
=== 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 - True
HomeAccountId - False
CorrelationId - 5b06a50e-10f0-491a-8af1-5bd4a0107045
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] === 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 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] Access token is not expired. Returning the found cache entry. [Current time (03 / 29 / 2023 13:08:17) - Expiration Time (03 / 29 / 2023 14:09:38 +00:00) - Extended Expiration Time (03 / 29 / 2023 14:09:38 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19045 [2023-03-29 13:08:17Z - 5b06a50e-10f0-491a-8af1-5bd4a0107045] AT expiration time: 3/29/2023 2:09:38 PM +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-03-29T14:09:38.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'TENANTID', UserId: 'reader@contoso.com'
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP01/providers/Microsoft.Automation/automationAccounts?api-version=2022-08-08
Headers:
Accept-Language : en-US
x-ms-client-request-id : d25d7aaa-36ae-4d98-9214-a1065935a11c
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Cache-Control : no-cache
Pragma : no-cache
x-ms-request-id : 0a5b874c-0229-4bf1-af7e-4a62d7373d4f
Server : Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11994
x-ms-correlation-request-id : d5540606-a78a-4597-a0dc-5ff0d1f5434e
x-ms-routing-request-id : CANADACENTRAL:20230329T130818Z:d5540606-a78a-4597-a0dc-5ff0d1f5434e
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Get-Date : Wed, 29 Mar 2023 13:08:17 GMT
Body:
{
'value': [
{
'id': '/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP01/providers/Microsoft.Automation/automationAccounts/AUTOMATIONACCOUNT00',
'location': 'eastus2',
'name': 'AUTOMATIONACCOUNT00',
'type': 'Microsoft.Automation/AutomationAccounts',
'tags': {},
'properties': {
'creationTime': '2022-06-24T15:56:53.997-04:00',
'lastModifiedTime': '2022-10-30T15:11:38.333-04:00',
'state': 'Ok'
}
},
{
'id': '/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP01/providers/Microsoft.Automation/automationAccounts/DESIREDAUTOMATIONACCOUNT',
'location': 'eastus2',
'name': 'DESIREDAUTOMATIONACCOUNT',
'type': 'Microsoft.Automation/AutomationAccounts',
'tags': {},
'properties': {
'creationTime': '2017-07-17T14:36:25.027-04:00',
'lastModifiedTime': '2023-01-24T11:42:48.883-05:00',
'state': 'Ok'
},
'identity': {
'type': 'systemassigned',
'principalId': 'PRINCIPALID',
'tenantId': 'TENANTID'
}
}
]
}
DEBUG: AzureQoSEvent: Module: Az.Resources:6.5.1; CommandName: Get-AzResource; PSVersion: 7.3.3; IsSuccess: True; Duration: 00:00:00.5761994
DEBUG: 9:08:18 AM - GetAzureResourceCmdlet end processing.
DEBUG: AzureQoSEvent: Module: Az.Automation:1.9.0; CommandName: Get-AzAutomationAccount; PSVersion: 7.3.3; IsSuccess: True; Duration: 00:00:00.7018188
DEBUG: 9:08:18 AM - [ConfigManager] Got [True] from [EnableDataCollection], Module = [], Cmdlet = [].
DEBUG: 9:08:18 AM - GetAzureAutomationAccount end processing.
Get-Process C:\Users\aeisen>
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 7.3.3
PSEdition Core
GitCommitId 7.3.3
OS Microsoft Windows 10.0.19045
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 2.11.1 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 1.9.0 Az.Automation {Export-AzAutomationDscConfiguration, Export-AzAutomationDscNodeReportContent, Export-AzAutomationRunbook, Get-AzAutomationAccount…}
Script 6.5.1 Az.Resources {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}
```
### Error output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.