MID Server authentication failure when using a credential alias


Description

When using a credential alias on a Discovery schedule it may fail and show the following error:


Authentication failure(s) with available Windows credentials from the instance.

{
  "debug_info": [
    {
      "192.168.0.1": {
        "credentials_attempted": [],
        "connection_parameters": {
          "affinity_credential_id": "1a79a4d60de6718e8e5b326e338ae533",
          "credential_types": [
            "Windows"
          ],
          "required_tag": "Test Credentials",
          "target": "192.168.0.1"
        }
      }
    }
  ]
}

Note in the error above, the "credentials_attempted" is empty and the "required_tag" shows the credential alias name.

This is caused by the space character in the credential alias name.

Steps to Reproduce

  1. Create new credential alias
  2. Use a space in the name of the credential alias, such as "Test Credential"
  3. Create a schedule to use the credential alias we just create
  4. During the Discovery, in the ECC queue, you can see WMIRunner input XML the error message showing no credential was attempted

Workaround

- Remove any spaces from the credential alias "name" field


Related Problem: PRB1454026