Comments (5)
@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.
@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.
@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.
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.
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)
- Getfilebyserverrelativeurl return corrupted file for .docx file HOT 3
- Batching multiple lists fail HOT 4
- Custom Http request to pull RateLimit-Reset header HOT 3
- Why use the .js extension in imports? HOT 3
- Email Notification delays while send email using @pnp/sp/utilities HOT 9
- Get Version History of a List Item in one request. HOT 3
- v4 - How do I get paged items using async iterator and break only when ALL items are retrieved? HOT 3
- sendEmail from property not working HOT 3
- Update Content Type from List endpoint and not web HOT 2
- Next on cached pagination request HOT 3
- Uploading data into an Excel Spreadsheet. HOT 8
- Add/Update methods no longer returning data as of V4 HOT 3
- How can I get a list of all folders in a document library? HOT 3
- Cannot read property 'Content-Type' of undefined HOT 20
- version 4 - @pnp/sp/favorites doesn't exists HOT 3
- PNP/Graph Error: No observers registered for this request. HOT 9
- Taxonomy is impossible to work with in v4 HOT 2
- IItemAddResult not found in "@pnp/sp/items", nor anywhere else that I can find HOT 2
- Graph API me/OwnedObjects is missing with pnp js 3.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pnpjs.