Karthik Athili
Karthik Athili

Reputation: 3

Endpoint in MS Graph to get SharePoint Online User Profile

Is there any endpoint available in MS Graph API to get the SharePoint Online User Profile. We wanted to access the custom properties that are created in SharePoint Online User Profile application for user through MS Graph API in our custom application.

We are only able to access Azure AD user resource in MS Graph but not the SharePoint Online user Profile.

Upvotes: 0

Views: 1043

Answers (1)

Tony Ju
Tony Ju

Reputation: 15629

For now, there is no endpoint from Microsoft Graph to get user information from SharePoint User Profile. You need to use SharePoint rest api to do this.

Endpoint URI

POST http://<site url>/_api/sp.userprofiles.profileloader.getprofileloader/getuserprofile

Get the user profile of the current user

$.ajax({
  url: "http://<site url/_api/sp.userprofiles.profileloader.getprofileloader
    /getuserprofile",
  type: "POST",
  headers: {
    "X-RequestDigest": <form digest value>,
    "accept": "application/json;odata=verbose"
  },
  success: successHandler,
  error: errorHandler
});

You can refer to this link for more details.

Upvotes: 0

Related Questions