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

PraveenKumar34 136 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 Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Graph
{count} votes

Accepted answer
  1. PraveenKumar34 136 Reputation points
    2021-05-24T17:28:58.887+00:00

    @MarileeTurscak i have created new user in that tenant and able to get accesstoken,thank u for the solution

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.