0

A marketplace app in Azure is installed as an app service. For claims based authentication to work the app requires the ADFS token-signing certificate be installed on Local Machine > Trusted People store. But there is no feature like that in Azure app service where I can install a certificate to a store (I'm not trying to change SSL settings of the app).

So I went to Advanced tools > Go (Kudu tools) in Azure app service and then Debug Console > Powershell. Here I issued this command

Import-Certificate -FilePath "D:\home\site\wwwroot\App_Data\website.cer" -CertStoreLocation "Cert:\LocalMachine\TrustedPeople" -Verbose

This threw an error

Import-Certificate : The Win32 internal error "The handle is invalid" 0x6 occurred while setting character attributes for the console output buffer.

How do I import this certificate in Azure so that the Marketplace app can access it? Not using IaaS.

EDIT 1: I tried Add-AzureCertificate cmdlet but it throws an error that Subscription is not selected. When I issue the Select-AzureSubscription with Subscription Id specified it says subscription does not exist.

EDIT 2: Tried connecting using Azure Rm cmdlet as suggested in comments. But still get same error - subscription does not exist. And if it cannot find subscription I cannot add the certificate using Import-Certificate

joym8
  • 4,014
  • 3
  • 50
  • 93

1 Answers1

-1
  1. Login using Connect-AzureRmAccount
  2. Select Your subscription from the list of subscriptions
  3. Select your Resource Group which contains the function app service
  4. Try importing now.
HariHaran
  • 3,642
  • 2
  • 16
  • 33