Missing authentication token needed in the API to use with OAuth access

Missing authentication token needed in the API to use with OAuth access

5465
Created On 03/25/24 15:39 PM - Last Modified 04/03/24 20:55 PM


Symptom


  • OAuth client credentials generated which is required to manage PA-VM-FLEX deployment profiles.
  • Although Client ID and Secret Key is generated, the information of authentication token is missing.
  • Authentication token is needed in the API to retrieve information about the credit pools.
  • Example: To retrieve info about all credit pools in your CSP account:
curl --location --request GET 'https://api.paloaltonetworks.com/tms/v1/creditPool' \
--header 'token: <your-token>'


Environment


  • PA-VM-FLEX
  • OAuth Client Credentials generated in the Customer Support Portal (CSP)'
  • Authentication token


Cause


Authentication token need to be generated.

Resolution


  1. Use the following API key to the OAUth Endpoint to generate the token to use with the API requests
curl --location 'https://identity.paloaltonetworks.com/as/token.oauth2' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=yourClientId’ \
--data-urlencode 'client_secret=yourSecret’ \
--data-urlencode 'scope=fwflex-service' \
--data-urlencode 'grant_type=client_credentials'
  1. Now use the generated token in the CLI command to get the information about credit pools.
curl --location --request GET 'https://api.paloaltonetworks.com/tms/v1/creditPool' \
--header 'token: <your-token>'


Additional Information


Other API requests for managing the credit pools

Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000XhzQCAS&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language