Secured rest call failing in AEM cloud
I have created a osgi class to call microsoft graph rest apis to get token. I have added jks and pem certs in core module src/main/resources. Program works fine in my local aem sdk, when I deploy it on cloud I get unable to find valid certification path to requested target
Is there any additional configuration or setup required in cloud to work.
Error details:
org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable
java.util.concurrent.CompletionException: com.microsoft.aad.msal4j.MsalClientException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: com.microsoft.aad.msal4j.MsalClientException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target