Certification not found and WsTrust endpoint not found in metadata document issues while using MSAL4j to acquire token - MSgraph API

PraveenKumar34 131 Reputation points
2021-05-21T10:08:26.907+00:00

i am trying to get access token using UserNamePasswordParameters it gives error:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

but i had added certificates from below to jre:

to bypass this certificate issue i had written java code that trust all certificates,now certificate issues is resolved eventhough i am getting error like :
com.microsoft.aad.adal4j.AuthenticationException: WsTrust endpoint not found in metadata document

i had searched in internet for this ws trust issue it has been mentioned to use admin credientials ,i am using same as well.

but i was able to get accesstoken using clientcredentials there was no error in that

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,646 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,566 questions
{count} votes

0 additional answers

Sort by: Most helpful