Getting invalid username or password when trying to authenticate as admin user

When we are trying to authenticate as the admin user (that was created as part of our initial setup) using this documentation, we get the error as shown below

curl -X POST "https://<baas_host_name>/management/token" -d '{"grant_type":"password", "username":<admin_username>, "password":<admin_password>}'

Error:

{"error_description":"invalid username or password","error":"invalid_grant"} 

We’ve verified that the username and password are correct (i.e. We can use this username/password to log in to the Edge/BaaS account), but we are still getting “invalid username or password”.

Can someone let me know why are we getting this error ?

0 1 1,031
1 REPLY 1

Found that we could use the Admin user authentication API mentioned in the question on Private Cloud and get the tokens.

However, on public cloud we should get the token for admins using the instructions given in the below link:

https://docs.apigee.com/api-services/content/using-oauth2-security-apigee-edge-management-api

The token obtained from the above link should work with both Management and BaaS APIs.