0
votes

How can I decommission a publishsettings file generated by Get-AzurePublishSettingsFile?

I need to make sure users who received a copy the publishsettings file cannot connect to our company's subscription anymore.

Update 1: I should have mentioned in my question that I've tried deteting the certificate from the Settings / Management Certificates section.Surprisingly, still I am able to connect, even though the certificate is deleted from the Settings / Management Certificates section.

Also I have deleted the file AzureProfile.json from %appdata%\Windows Azure Powershell. Still I can do Import-AzurePublishSettingsFile with the .publishsettings file !!!

Am I missing anything?

Update2: Ok, @Neil Mackenzie is right.

Here is what I was missing. When the certificate is deleted, still the entry exists in the file %appdata%\Windows Azure Powershell\AzureProfile.json. THAT IS WHAT Get-AzureSubscription RETURNS, and that confused me. I though I am authenticated if I can call GetAzureSubscription. I was wrong. As soon as I tried to call a command that requires authentication, I got an error explained the certificate is invalid.

You can take a look and see that the account entries in AzureProfile.json is the actual certificate's thumbprint in the portal's Settings / Management Certificates section. If the thumbprint is missing, the authentication fails.

1

1 Answers

0
votes

Go the Settings / Management Certificates section of the Azure Production Portal and delete the certificate from there. It will no longer be usable as a certificate to authenticate management operations.