Error "Requested value 'Standard_Microsoft' was not found" When retrieving CDN Profile of "Standard Microsoft" Pricing Tier
Description
When trying to retrieve the CDN profile information from PowerShell using the Get-AzureRmCdnProfile cmdlet, an error is being thrown when the Pricing Tier of the CDN Profile is "Standard Microsoft". Error details are given below. Also, please note, this error occurs only when the CDN Profile is "Standard Microsoft". This doesn't happen for other pricing tiers.
Script/Steps for Reproduction
Get-AzureRmCdnProfile -ResourceGroupName "SampleResGrp" -ProfileName "sampledev-cdn-stdms"
Module Version
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 6.5.0 AzureRM
Script 6.4.0 AzureRM
Script 6.3.0 AzureRM
Environment Data
PS C:\WINDOWS\system32> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.16299.547
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.547
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Debug Output
PS C:\WINDOWS\system32> Get-AzureRmCdnProfile -ResourceGroupName "SampleResGrp" -ProfileName "sampledev-cdn-stdms" -Debug
DEBUG: 5:16:39 PM - GetAzureRmCdnProfile begin processing with ParameterSet '__AllParameter
Sets'.
DEBUG: 5:16:40 PM - using account id '[email protected]'...
DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]
rosoft.com', environment: 'AzureCloud', tenant: 'some_guid'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/26/2018 11:46:40: e55c73bc-81b3-422f-8023-3687236ec65d - AcquireTokenHandlerBase:
=== Token Acquisition started:
Authority: https://login.microsoftonline.com/bd3eeefe-e2f5-40d6-abc6-bbb9c8f48d03/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (5 items
)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/26/2018 11:46:40: - TokenCache: Deserialized 5 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 07/26/2018 11:46:40: e55c73bc-81b3-422f-8023-3687236ec65d - TokenCache: Looking up c
ache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/26/2018 11:46:40: e55c73bc-81b3-422f-8023-3687236ec65d - TokenCache: An item matc
hing the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 07/26/2018 11:46:40: e55c73bc-81b3-422f-8023-3687236ec65d - TokenCache: 55.798676733
3333 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/26/2018 11:46:40: e55c73bc-81b3-422f-8023-3687236ec65d - TokenCache: A matching i
tem (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/26/2018 11:46:40: e55c73bc-81b3-422f-8023-3687236ec65d - AcquireTokenHandlerBase:
=== Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: M3iy/sa3nlBzseq4aQsaRr9XP0vwmPooI37OFe9O3Uk=
Refresh Token Hash: 87g8rBpC1AYpdC9voU3Zo4IsYVaKXqZxDJ4oNtX1iGQ=
Expiration Time: 07/26/2018 12:42:28 +00:00
User Hash: 0suXSN4+jzoys3IwtT2eQMGZKAEMsP2Sr6heBKDuZDk=
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/26/2018 11:46:40: 57456b5f-8ac2-4bda-a6d1-6cb7f4ad24c0 - AcquireTokenHandlerBase:
=== Token Acquisition started:
Authority: https://login.microsoftonline.com/bd3eeefe-e2f5-40d6-abc6-bbb9c8f48d03/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (5 items
)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/26/2018 11:46:40: - TokenCache: Deserialized 5 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 07/26/2018 11:46:40: 57456b5f-8ac2-4bda-a6d1-6cb7f4ad24c0 - TokenCache: Looking up c
ache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/26/2018 11:46:40: 57456b5f-8ac2-4bda-a6d1-6cb7f4ad24c0 - TokenCache: An item matc
hing the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 07/26/2018 11:46:40: 57456b5f-8ac2-4bda-a6d1-6cb7f4ad24c0 - TokenCache: 55.798610065
minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/26/2018 11:46:40: 57456b5f-8ac2-4bda-a6d1-6cb7f4ad24c0 - TokenCache: A matching i
tem (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/26/2018 11:46:40: 57456b5f-8ac2-4bda-a6d1-6cb7f4ad24c0 - AcquireTokenHandlerBase:
=== Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: M3iy/sa3nlBzseq4aQsaRr9XP0vwmPooI37OFe9O3Uk=
Refresh Token Hash: 87g8rBpC1AYpdC9voU3Zo4IsYVaKXqZxDJ4oNtX1iGQ=
Expiration Time: 07/26/2018 12:42:28 +00:00
User Hash: 0suXSN4+jzoys3IwtT2eQMGZKAEMsP2Sr6heBKDuZDk=
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/5ef79c0f-1020-44df-9a79-f8932f9ee94b/resourceGro
ups/SampleResGrp/providers/Microsoft.Cdn/profiles/sampledev-cd
n-stdms?api-version=2017-10-12
Headers:
x-ms-client-request-id : eb4c0b67-9e4c-46ce-bea0-0d8aeb8ab243
accept-language : en-US
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Pragma : no-cache
x-ms-request-id : 2fc6172d-8282-4782-a602-23ba12cd038b
x-ms-client-request-id : a671b25b-c854-43ba-aaec-340054dc18c4
OData-Version : 4.0
Strict-Transport-Security : max-age=31536000; includeSubDomains
x-ms-ratelimit-remaining-subscription-reads: 14985
x-ms-correlation-request-id : d72bba2f-1394-4aab-a95b-34817736c1eb
x-ms-routing-request-id : SOUTHEASTASIA:20180726T114641Z:d72bba2f-1394-4aab-a95b-3481
7736c1eb
X-Content-Type-Options : nosniff
Cache-Control : no-cache
Date : Thu, 26 Jul 2018 11:46:41 GMT
Server : Microsoft-IIS/8.5
X-AspNet-Version : 4.0.30319
X-Powered-By : ASP.NET
Body:
{
"name": "sampledev-cdn-stdms",
"id": "/subscriptions/5ef79c0f-1020-44df-9a79-f8932f9ee94b/resourcegroups/SampleResGrp/providers/Microsoft.Cdn/profiles/sampledev-cdn-stdms",
"type": "Microsoft.Cdn/profiles",
"tags": {},
"location": "NorthEurope",
"sku": {
"name": "Standard_Microsoft"
},
"properties": {
"provisioningState": "Succeeded",
"resourceState": "Active"
}
}
VERBOSE: Success!
Get-AzureRmCdnProfile : Requested value 'Standard_Microsoft' was not found.
At line:1 char:1
+ Get-AzureRmCdnProfile -ResourceGroupName "SampleRes ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureRmCdnProfile], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Cdn.Profile.GetAzureRmCdnProfile
DEBUG: AzureQoSEvent: CommandName - Get-AzureRmCdnProfile; IsSuccess - False; Duration - 00
:00:05.6060466; Exception - System.ArgumentException: Requested value 'Standard_Microsoft'
was not found.
at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult&
parseResult)
at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
at Microsoft.Azure.Commands.Cdn.Helpers.ModelExtensions.ToPsSku(Sku sdkSku)
at Microsoft.Azure.Commands.Cdn.Helpers.ModelExtensions.ToPsProfile(Profile sdkProfile)
at Microsoft.Azure.Commands.Cdn.Profile.GetAzureRmCdnProfile.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 5:16:45 PM - GetAzureRmCdnProfile end processing.
DEBUG: 5:16:45 PM - GetAzureRmCdnProfile end processing.
Let me know in case any more information is required.
Thanks.
@prakharsharma10 Can you take a look at this issue?
The issue is because there is no support for the Standard_MIcrosoft in the swagger for CDN. We are in the transitioning phase and Nandita is working on it. She'll update the current status soon.
Do you have any update on this? It's already been 2 months since we raised this issue.
+Hanyun – who added this support .
@Hanyun – is this done and checked in?
Thanks Nandita
From: vinaydam [mailto:[email protected]] Sent: Thursday, September 20, 2018 2:06 AM To: Azure/azure-powershell [email protected] Cc: Nandita Chakraborti [email protected]; Assign [email protected] Subject: Re: [Azure/azure-powershell] Error "Requested value 'Standard_Microsoft' was not found" When retrieving CDN Profile of "Standard Microsoft" Pricing Tier (#6783)
Do you have any update on this? It's already been 2 months since we raised this issue.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-powershell%2Fissues%2F6783%23issuecomment-423102850&data=02%7C01%7CNandita.Chakraborti%40microsoft.com%7Cbd68000470b54d80782508d61ed856e4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636730311857415156&sdata=uwhT2TiXuUVywqJYsfKRvcvnIGJT9gEX3bEk5XHG4Ro%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAmgMG0BeGR6-bXkIQgQYzVd0njc5yWiLks5uc1qPgaJpZM4VhrV-&data=02%7C01%7CNandita.Chakraborti%40microsoft.com%7Cbd68000470b54d80782508d61ed856e4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636730311857425161&sdata=KKiJFryDj3JUBCn8Pa1KSrg4TmcDut%2FRwhPoBhnOQV4%3D&reserved=0.
Hi,
Changes for Standard_Microsoft sku has been checked in.
Thanks, Hanyun From: Nandita Chakraborti Sent: Thursday, September 20, 2018 9:58 AM To: Azure/azure-powershell [email protected]; Azure/azure-powershell [email protected]; Hanyun Tao [email protected] Cc: Assign [email protected]; Azure CDN Engineering Team [email protected] Subject: RE: [Azure/azure-powershell] Error "Requested value 'Standard_Microsoft' was not found" When retrieving CDN Profile of "Standard Microsoft" Pricing Tier (#6783)
+Hanyun – who added this support .
@Hanyun – is this done and checked in?
Thanks Nandita
From: vinaydam [mailto:[email protected]] Sent: Thursday, September 20, 2018 2:06 AM To: Azure/azure-powershell <[email protected]mailto:[email protected]> Cc: Nandita Chakraborti <[email protected]mailto:[email protected]>; Assign <[email protected]mailto:[email protected]> Subject: Re: [Azure/azure-powershell] Error "Requested value 'Standard_Microsoft' was not found" When retrieving CDN Profile of "Standard Microsoft" Pricing Tier (#6783)
Do you have any update on this? It's already been 2 months since we raised this issue.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-powershell%2Fissues%2F6783%23issuecomment-423102850&data=04%7C01%7C%7C45e4574eb1f94df9b51b08d61f1a4a80%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636730595107250128%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=9o1NzhQxQp6DETaZs5OdPFXqIfnQWVRU96C63cRcUCQ%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAmgMG0BeGR6-bXkIQgQYzVd0njc5yWiLks5uc1qPgaJpZM4VhrV-&data=04%7C01%7C%7C45e4574eb1f94df9b51b08d61f1a4a80%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636730595107260138%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=gWGEdqLOYndmJRcQckZy3MAIikc8fQT2X2%2FUeCSX6tc%3D&reserved=0.
@nachakra @hanyun We are still seeing the issue. Can you please check once again?
What is the status on this? I also get this error.
It works for me for a "Microsoft standard" pricing tier profile. Can you confirm that you have the latest powershell Azure sdk?
I have the same error too, after updating all Azure* Modules:
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name
---------- ------- ----
Script 5.3.0 Azure
Script 5.1.2 Azure
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name
---------- ------- ----
Script 6.13.1 AzureRM
Script 5.7.0 AzureRM
PS C:\windows\system32> Get-AzureRmCdnProfile
Get-AzureRmCdnProfile : Requested value 'Standard_Microsoft' was not found.
At line:1 char:1
+ Get-AzureRmCdnProfile
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureRmCdnProfile], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Cdn.Profile.GetAzureRmCdnProfile
The commands work with no error with "Az.Cdn 1.8.1".
PS C:\WINDOWS\system32> $profile = Get-AzCdnProfile -ResourceGroupName bzhan-poc -ProfileName msft-test
PS C:\WINDOWS\system32> $profile.Sku.Name
Standard_Microsoft
PS C:\WINDOWS\system32> Get-InstalledModule
Version Name Repository Description
------- ---- ---------- -----------
5.9.0 Az PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with WindowsPowerShell and PowerShell Core....
2.7.1 Az.Accounts PSGallery Microsoft Azure PowerShell - Accounts credential management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.1 Az.Advisor PSGallery Microsoft Azure PowerShell - Azure Advisor Cmdlets for Advisor in Windows PowerShell and PowerShell Core. Get Advisor recommendations, Manage Advisor configurations.
2.1.0 Az.Aks PSGallery Microsoft Azure PowerShell - Azure managed Kubernetes cmdlets for Windows PowerShell and PowerShell Core....
1.1.4 Az.AnalysisServices PSGallery Microsoft Azure PowerShell - Analysis Services cmdlets for Windows PowerShell and PowerShell Core....
2.2.0 Az.ApiManagement PSGallery Microsoft Azure PowerShell - Api Management service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.0.0 Az.AppConfiguration PSGallery Microsoft Azure PowerShell: AppConfiguration cmdlets
1.1.0 Az.ApplicationInsights PSGallery Microsoft Azure PowerShell - Application Insights management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Creates and manages application insights in Azure Resource ...
1.7.0 Az.Automation PSGallery Microsoft Azure PowerShell - Automation service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
3.1.0 Az.Batch PSGallery Microsoft Azure PowerShell - Batch service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.0.0 Az.Billing PSGallery Microsoft Azure PowerShell - Billing service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.8.1 Az.Cdn PSGallery Microsoft Azure PowerShell - CDN service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
Please try upgrade the Az.Cdn module to see whether the issue is addressed.