Closed Feroz1991 closed 2 years ago
@Feroz1991 - pls make sure that the JWT you are passing matches the client_id and email you have in your pom
When you are passing a bearer token, make sure the Apigee Maven profile you are calling is also having
We are also getting the same error Access token not valid However we can upload ( Only upload, not deployed ) with the same bearer token in apigee env from local command prompt through maven command. From Jenkins pipeline its not working earlier. We changed the generated URL and now it's working fine. Correct URL: https://api.enterprise.apigee.com/v1/organizations/myOrg_name/apis?action=import&name=GIES_Boomi_PowerAutomate
Earlier it was: https://myOrg.apigee.com/v1/organizations/My_Org_name/apis?action=import&name=GIES_Boomi_PowerAutomate
Thanks
@anoopsaxena - not sure I am following what you mean.
Access token not valid could have three possible reasons 1) its not a valid token 2) the client id you are passing does not match with the value in the JWT 3) the username you are passing does not match with the value in the JWT
The URL configured incorrectly has nothing to do with the plugin issue.
@Feroz1991 - Can you please confirm if you still see the issue? If not, I would like to close the issue
I am also experiencing the same issue. Apigee org is SSO enabled with external IDP. I am using the following command in my Jenkinsfile to deploy my proxy:
mvn -B install -P<<{ENVIRONMENT}>> -Dusername=<<{APIGEE_USERNAME}>> -Dorg=<<{ORG}>> -Dauthtype=oauth -Dbearer=<<{ACCESS_TOKEN}>> -DartifactName=<<{apiproxyName}>> -DapiType=apiproxy
The
Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.2.2:deploy (deploy-bundle) on project SampleDeploy1: Access token not valid -> [Help 1]
@shaunmirza - Can you please decode your bearer token (using jwt.io) and see if the apigee.clientid matches from the value in the token and also the same for apigee.username. If they dont match, the plugin will raise "Access token not valid".
Also please check if the token is not expired.
@shaunmirza - any update on this? Else I will have to close this issue
@shaunmirza - any update on this? Else I will have to close this issue
Clientid and username matched the token. The culprit was the tokenurl in the profile of the sharedpom.xml. I had to change it to my custom url. Everything works, thanks!
i am getting access token not valid error while i can use the same bearer token and deploy from my local. but from jenkins its rying through maven its not working