-
Notifications
You must be signed in to change notification settings - Fork 51
standalone call for "UserProfileProperties" #38
Comments
Hi @YakQin The library already has the ability to query a single profile property (as opposed to all of them) - is this what you're looking for?
It runs the query you show in the "URL" above: |
to make long story short, if I want to get the "Department" and if I run query sprLib.user(options).profile("UserProfileProperties"), the query will all return "Peers", "DirectReports" etc, however I don't need those details. so the query returns a lot of data that is not needed. we have a waste here.
|
Gotcha: Just query what we need, not the entire result set. So, even better than pulling all This is the call i've implemented, it's super efficient and the smallest possible network footprint. In the case of multiple properties, then your code above is used as there is no equivalent to |
This is perfect ! thanks a lot |
Hi,
again this is a great library!
if I only need the "UserProfileProperties" the call will return all other "Person Properties" though the API will return only "UserProfileProperties" with function sprLib.user(options).profile('UserProfileProperties')
from the performance perspective the call returns a lot of info that we don't need, especially when the user has many peers or direct reports etc. If possible you may create a standalone function for UserProfileProperties only with below query :
Url = "https://xx.sharepoint.com/teams/3wuam/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)/UserProfileProperties?@v='i:0%23.f|membership|" + mailID + "'"
with above query we can get the UserProfileProperties much faster
just a suggestion but the existing functions are already great to go with :)
The text was updated successfully, but these errors were encountered: