While attempting to deploy an agent the credentials test works, but the agent deployment fails with the message:
Unable to deploy agent. Unable to get provision certificate bytes for agent deployment.
The following errors are seen in C:\ProgramData\Solarwinds\Logs\AgentManagement\AgentManagement.Service.log
2015-11-18 10:43:44,872  ERROR SolarWinds.AgentManagement.ServiceCore.CertificateManagement.CertificateManager - Error generating provisioning certificate. Agents will not be provisioned.
System.ComponentModel.Win32Exception (0x80004005): certmgmt::createsignedcertandexporttopfxfile failed
at SolarWindsAgentCLR.Core.CertificateManagement.certmgmt.createsignedcertandexporttopfxfile(String msubjectName, String missuername, String missuerstore, String mpfxfqpath, SecureString mss, Boolean dontsavetostore, String maccounttoaddtoprivatekeyacl)
at SolarWinds.AgentManagement.ServiceCore.CertificateManagement.CertificateGenerator.GenerateProvisioningCertificateToFile(X509Certificate2 caCertificate, String pathToSaveCertificate)
at SolarWinds.AgentManagement.ServiceCore.CertificateManagement.CertificateManager.GenerateProvisioningCertificate(IAgentManagementDbContext db)
2015-11-18 10:43:44,872  ERROR SolarWinds.AgentManagement.ServiceCore.Services.AgentProvisioningService - Provisioning certificate for agents does not exist and can't be generated. Agents provisioning may not work.
The agent fails to deploy because the Agent Management Service does not have an Agent provisioning certificate, which is used to encrypt data sent from the agent to the server.
The error logged during certificate creation is NTE_BAD_KEYSET (0x80090016). This can have three most common reasons:
First, confirm that the permissions are correctly set and that the Protected Storage service is running:
Then, check to see if the SolarWinds Agent Provisioning certificate was created:
Finally, try to deploy the agent from the web again (Settings > Manage Agents > Add Agent). If you followed the steps above, you should no longer see the error in the log.