Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

IMS token exchange stats is triggered in automatic way after one servlet is executed.


Level 3

Hi coummunity,


We would like to know what needs to be done to avoid 

com.adobe.granite.auth.ims.impl.CachedIMSClusterATExchangeGrantProviderImpl IMS token exchange stats to be executed.
We have a servlet to obtain an application token and then another servlet to use the token an consume a webservice. On our author instance all the process is working perfect, however on our publish instance is not working as expected.
We noticed looking at aemerror log file on the publish instance that after we obtain the token immediately before the second servlet runs we got an error related to com.adobe.granite.auth.ims.impl.CachedIMSClusterATExchangeGrantProviderImpl and we dont have any code code related to that. 
Here we get our servlet response fine.


But after we get 






We don't have any Oauth integration.


Thanks in advance if you can help us resolve our problem.

2 Replies


Community Advisor

Hi @olsalas711 ,


Can you try disabling the config in System/console once, and see if you still get the same error.




Level 3

Thanks @Anmol_Bhardwaj ,


Do you know what need to be done in order to use our custom Bearer Token and not one from IMS on our servlet?


In below image is how we pass our custom Bearer token to the servlet. Do we need to include any custom directive or annotation to ignore adobe ims and force to use our bearer token?