Hi, I am using Acumatica 25R1enabled with SSO, so SharePoint user can able to login in Acumatica by click on ‘Active directory‘ on login screen and put their SSO credential.
I am trying from my Acumatica Instance to call Graph API to get data from SharePoint of login user but not find any way to do.
In the this code I can get the loin user name, but I am not able to get the access token of graph API to get data, please check this code and help me what I am missing
var httpContext = HttpContext.Current;
if(httpContext != null && httpContext.User.Identity.IsAuthenticated) {
ClaimsPrincipal user = httpContext.User as ClaimsPrincipal;
var accessTokenClaim = user?.FindFirst("access_token");
// Ensure this claim exists
if(accessTokenClaim != null) {
return accessTokenClaim.Value; // Return the access token if it exists
}
}
Regards,
Abhishek