Open kwill-MSFT opened 6 years ago
@kwill-MSFT Hey Kevin, would you mind providing the output of the following command:
$resource = Get-AzureRmResource -ResourceName "7AF95FD8301E759535D8C9BD6F7C61E7DD92833F#TranslatorAPI_RG-WestUSwebspace" -ResourceGroupName "TranslatorAPI_RG" -ResourceType "Microsoft.Web/certificates"
We are curious what the resulting properties are of the object returned.
@vivsriaus @ravbhatnagar would you mind taking a look at this issue?
PS C:\Users\kwill> $resource = Get-AzureRmResource -ResourceName "7AF95FD8301E759535D8C9BD6F7C61E7DD92833F#TranslatorAPI
_RG-WestUSwebspace" -ResourceGroupName "TranslatorAPI_RG" -ResourceType "Microsoft.Web/certificates"
PS C:\Users\kwill> $resource
Name : 7AF95FD8301E759535D8C9BD6F7C61E7DD92833F#TranslatorAPI_RG-WestUSwebspace
ResourceId : /subscriptions/5857f4d2-3dce-4b96-ad95-677f764e7a67/resourceGroups/TranslatorAPI_RG/providers/Micro
soft.Web/certificates/7AF95FD8301E759535D8C9BD6F7C61E7DD92833F#TranslatorAPI_RG-WestUSwebspace
ResourceName : 7AF95FD8301E759535D8C9BD6F7C61E7DD92833F#TranslatorAPI_RG-WestUSwebspace
ResourceType : Microsoft.Web/certificates
ResourceGroupName : TranslatorAPI_RG
Location : West US
SubscriptionId : 5857f4d2-3dce-4b96-ad95-677f764e7a67
Tags : {Test}
Properties : @{friendlyName=; subjectName=makecert; hostNames=System.Object[]; pfxBlob=; siteName=; selfLink=;
issuer=makecert; issueDate=2018-01-22T16:48:36+00:00; expirationDate=2039-12-31T23:59:59+00:00;
password=; thumbprint=7AF95FD8301E759535D8C9BD6F7C61E7DD92833F; valid=; toDelete=; cerBlob=;
publicKeyHash=; hostingEnvironment=; hostingEnvironmentProfile=; keyVaultSecretStatus=Initialized;
webSpace=TranslatorAPI_RG-WestUSwebspace; serverFarmId=; tags=}
CC: @Tiano2017
Any update on this? I ran into this recently while trying to clean-up some expired app service certificates.
Description
Inconsistent URI encoding for Get-AzureRmResource and Set-AzureRmResource causes failures when working with App Service Certificates.
App Service Certificates use naming convention thumbprint#resourcegroup. The '#' is not always correctly encoded to %23, which causes the API call to fail with error: MissingApiVersionParameter : The api-version query parameter (?api-version=) is required for all requests.
Script/Steps for Reproduction
These commands work:
These commands fail:
Module Version
Environment Data
Debug Output