cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

Controller (SaaS, On Premises)

Not able to generate OAuth 2.0 Token from on-premise controller

Miles.Jin
Explorer

Not able to generate OAuth 2.0 Token from on-premise controller

Installed Appd EC and Controller on 192.168.xx.xx, created user miles and API client poc.

Post from postman:

curl -X POST -H "Content-Type: application/vnd.appd.cntrl+protobuf;v=1" "http://192.168.xx.xx:8090/controller/api/oauth/access_token" -d 'grant_type=client_credentials&client_id=poc@miles&client_secret=1d7d9f28-b9a8-xxxx-xxxx-68e76fc58db7'

returns 401.

By replying you agree to the Terms and Conditions of the AppDynamics Community.
Not able to generate OAuth 2.0 Token from on-premise controller
1 REPLY 1
Mario.Morelli
Architect

Hi Miles

 

if you installed the Controller on premise, what is your account name? If you navigate to the Administration > License > Account menu, what is your account name? the default is normally customer1

 

You also only need an API client, not a User as well

 

curl -X POST -H "Content-Type: application/vnd.appd.cntrl+protobuf;v=1" "http://192.168.xx.xx:8090/controller/api/oauth/access_token" -d 'grant_type=client_credentials&client_id=poc@miles&client_secret=1d7d9f28-b9a8-xxxx-xxxx-68e76fc58db7'

 

The format needs to be as follows if you have the following

API Client Name - poc

account name - customer 1

 

 

curl -X POST -H "Content-Type: application/vnd.appd.cntrl+protobuf;v=1" "http://192.168.xx.xx:8090/controller/api/oauth/access_token" -d 'grant_type=client_credentials&client_id=poc@customer1&client_secret=1d7d9f28-b9a8-xxxx-xxxx-68e76fc58db7'

 

Ciao



Learn more about me in the Community Member Spotlight Q & A