I have a guest account to access the ClearPass API clients and REST API. So let's say my guest credentials are
username = myGuestUsername
password = myGuestPassword
with the following settings
When calling the REST API via
https://clearpass.company.com:443/api/oauth
with my client credentials (changed grant type)
{
"grant_type": "client_credentials",
"client_id": "myAPIClientID",
"client_secret": "theGeneratedAPIClientSecret"
}
I get a valid access token. When I change the grant type to username and password and call the REST API with the body
{
"grant_type": "password",
"client_id": "myAPIClientID",
"username": "myGuestUsername",
"password": "myGuestPassword"
}
I get a 401 response
{
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "invalid_grant",
"status": 401,
"detail": "Invalid username and password combination"
}
I think using the guest credentials is not correct. Which credentials are correct? Is it possible to generate a username and password for the API client?
I can access the API with the client credentials but other users might not have access to the client secret so I want them to log in with user credentials.