Giter Site home page Giter Site logo

Comments (5)

juliemturner avatar juliemturner commented on July 18, 2024 1

@bhoomesh-spe - Because users are not added to the hidden siteUserInfoList until either a) they access the site or b) you call ensureUser for their user id. If you want to just "search" for a user, you should use the search endpoint instead which at this point is most easily done with SharePoint Search -- you'll want to make sure your search includes the sourceId for People which is the same for every tenant -- but also can be done with Microsoft Graph Search

SharePoint Search example

  const q: SearchQueryInit = SearchQueryBuilder(`${searchString}`)
        .sourceId("B09A7990-05EA-4AF9-81EF-EDFAB16C4E31")
        .rowLimit(500)
        .rowsPerPage(500)
        .selectProperties("SipAddress", "PreferredName", "AccountName", "Department", "JobTitle")
        .trimDuplicates;
  const people: SearchResults = await this._sp.search(q);

from pnpjs.

bhoomesh-spe avatar bhoomesh-spe commented on July 18, 2024

@juliemturner - Thanks for the quick response. Can we load all users for the site using the PowerShell script? i.e. The admin can run the script from SharePoint Online Management Shell and all users appear in the search.

from pnpjs.

patrick-rodgers avatar patrick-rodgers commented on July 18, 2024

@bhoomesh-spe - while we try and be helpful, this is not a general support forum. Yes, you can load all the users from a PowerShell script, but that has nothing to do with PnPjs so we're not able to provide that guidance. Will close this issue as answered. Thanks!

from pnpjs.

juliemturner avatar juliemturner commented on July 18, 2024

I'm just going to add, all the users already show in search just not in the site's hidden user list. Search is not the intent of the hidden user list it's a lookup list for any User based list/site columns.

from pnpjs.

github-actions avatar github-actions commented on July 18, 2024

This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.

from pnpjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.