Describe the bug
We're trying to import a certificate in a resourcegroup from the key vault and bind the certificate to a hostname.
The method returns a OK statuscode and the import seems to be ok, however it doesn't show up in the list of ssl certificates in the azure web app (in the same resource group). We can see the certificate if we fetch a list of certificates for the current resource group in our code.
However, when we try to bind it to our hostname we get Not Found exception.
We don't know what we are doing wrong.
Code Snippet
var certificateEnvelope = new CertificateInner(
"West Europe",
string.Empty,
serverFarmId: webApp.AppServicePlanId,
keyVaultId: "...",
keyVaultSecretName: "...");
var test = await _azure.AppServices.AppServiceCertificates.Inner.CreateOrUpdateAsync(webApp.ResourceGroupName, "...", certificateEnvelope, cancellationToken);
await webApp.Update().DefineSslBinding().ForHostname(domain).WithExistingCertificate(test.Thumbprint).WithSniBasedSsl().Attach().ApplyAsync(cancellationToken);
Setup (please complete the following information):
Describe the bug We're trying to import a certificate in a resourcegroup from the key vault and bind the certificate to a hostname. The method returns a OK statuscode and the import seems to be ok, however it doesn't show up in the list of ssl certificates in the azure web app (in the same resource group). We can see the certificate if we fetch a list of certificates for the current resource group in our code.
However, when we try to bind it to our hostname we get Not Found exception. We don't know what we are doing wrong.
Code Snippet
Setup (please complete the following information):