Microgateway : Apikey and OAuth access token generation not working

Thanks for the reply. The https://…/edgemicro-auth endpoint is reachable. I am able to get the token using CURL command.

curl -i -X POST “http://myorg-test.apigee.net/edgemicro-auth/token” -d ‘{ “client_id”: “CLIENT_ID”, “client_secret”: “SECRET”, “grant_type”: “client_credentials” }’ -H “Content-Type: application/json”

HTTP/1.1 200 OK

Date: Mon, 09 Oct 2017 07:26:06 GMT

Content-Type: application/json

Content-Length: 911

Connection: keep-alive

Server: Apigee Router

{“token”:“tokenstring”}

But, generating token using edgemicro token get command is not working, does it need any changes in the config.yaml file? Auth uri in the yaml file is "authUri: ‘https://%s-%s.apigee.net/edgemicro-auth’ ". Tried changing this endpoint to https://myorg-test-apigeenet/edgemicro-auth which throws nodeapp error.

Also, did some debugging on the apikey and oauth issue and the findings are

  1. Verifyapikey api from Apigee Edge is called and its successful 200.

  2. VerifyApikey returns JWT token to Microgateway.

  3. The JWT token validation fails in Microgateway in oauth plugin.

Same issue is happening in edgemicro 2.5.4 and 2.4.6 version.

Any help is appreciated.