I'm looking for some help with a REST call I'm attempting to make in SharePoint Online.

I'm doing an add-in that gives me the name, birhday and photo property of all user in user profiles

enter image description here

I tried with this code

 var siteUrl = _spPageContextInfo.siteAbsoluteUrl;
        url: siteUrl + "/_api/SP.UserProfiles.PeopleManager/GetMyProperties",
        method: "GET",
        headers: { "Accept": "application/json; odata=verbose" },
        success: function (data) {
        error: function(error) {

but I only get current user profile properties, what I need is all user profiles properties for all users, how can i achieve that?

Thanks in advance!


4 Answers 4


Still this no API for retrieving all user profiles from SharePoint Online

You can get current user's profile


Or a particular user's profile by login name

/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i:0%23.f|membership|[email protected]'

BUT You can get available user profiles in a site

  • How about SP.UserProfiles.js? Yes I know OP specifically say REST, but this should actually work, also for apps (which is not so easy with _vti_bin).
    – eirikb
    Commented May 25, 2016 at 18:00
  • 1
    It is used to get the user's information from SharePoint's default (hidden) list called UserInforamtion.
    – Hardik
    Commented May 25, 2016 at 19:30
  • 1
    I gave this as another option but you need users from tanent & it is not possible to get all user's all information from tanent using REST. :)
    – Hardik
    Commented May 25, 2016 at 19:31
  • 1
    Unfortunately there is no option for SharePoint Online.
    – Hardik
    Commented May 25, 2016 at 20:13
  • 1
    @Hardik We have the birthday but when I get the User Information List fron this link SiteURL/_vti_bin/listdata.svc/UserInformationList the Birthday is null <d:DateOfBirth m:type="Edm.DateTime" m:null="true" /> Commented May 25, 2016 at 22:11

you can use SPFx People Picker (version 11+) which was released recently at https://sharepoint.github.io/sp-dev-fx-controls-react/controls/PeoplePicker/ .

Basically, this control will allow you to pick any users in all trusted domains in SharePoint Online.



http://SiteURL/_api/Web/lists/getbytitle('User Information List')/Items


Accept: application/json; odata=verbose
Content-Type: application/json; odata=verbose

install pnpjs (https://pnp.github.io/pnpjs/)

npm i @pnp/pnpjs

import { sp } from "@pnp/pnpjs";
    import { SearchQueryInit } from "@pnp/sp/search";
        public async getSearchResults(startRow, rowLimit): Promise<[]> {
                let allResults: any = [];
                let queryParams: any = this._getQueryParams(
                queryParams.Timeout = 60000;
                const results = await (sp as any).search(queryParams);
                allResults.data = results.PrimarySearchResults;
                allResults.totalRows = results.TotalRows;
                return allResults;
            private _getQueryParams(
                startRow: number,
                rowLimit: number
            ) {
                let queryParams: SearchQueryInit = {
                    RowLimit: rowLimit,
                    Querytext: "*",
                    SelectProperties: ["AccountName"],
                    StartRow: startRow,
                    SourceId: "b09a7990-05ea-4af9-81ef-edfab16c4e31",
                    TrimDuplicates: false,
                return queryParams;
         this.getSearchResults(0, 50)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.