Need Sharepoint API to get principal id using sharepoint Auth token

Pankaj Kumar 26 Reputation points
2022-03-23T06:27:31.92+00:00

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 ?

Regards,
Pankaj Kumar

SharePoint
SharePoint
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
    2022-03-24T02:05:13.783+00:00

    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.

    feedback:
    https://feedbackportal.microsoft.com/feedback/


    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