Need Sharepoint API to get principal id using sharepoint Auth token

Pankaj Kumar 26 Reputation points

Hi Team,

We are looking for Sharepoint REST API to get principal id using Sharepoint auth token in header(without using user name).

we are using below API
<URL>/_api/web/siteusers('i%3A0%23.f%7Cmembership%7C" + userName + "%40" + domain + "')

is there any way we can skip username and use oauth token to get principals ?

Pankaj Kumar

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,793 questions
{count} votes

Accepted answer
  1. Tong Zhang_MSFT 9,116 Reputation points

    Hi @Pankaj Kumar ,

    Thanks for your detailed case description. I completely understand the situation and your feelings.

    When I received the case, I searched a lot of documents did a lot of researches. And I feel regretful to inform you that there is currently no API to implement this feature.

    And I noticed that some end users have also proposed the same request, it is highly recommended that you can vote this ticket. Many features of our current products are designed and upgraded based on customers’ feedback. With requirements like this increase, the problem may well be released in the future. Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful