Skip to main content
8 votes
Accepted

Display online users (SPO)

Extensive explanation, tutorial, etc.: Find Number of Users Currently Logged on to a SharePoint Site The gist of it is that you don't have OOTB features to show you the number of currently ...
Hardik's user avatar
  • 7,733
5 votes

How to get SharePoint site usage report at individual user level?

Except for the M365 Audit log report, there is no data collected on a per user basis for SharePoint online. The Audit log report collects EVERYTHING about that user's activity, not just in SharePoint, ...
teylyn's user avatar
  • 8,959
4 votes
Accepted

Check if the user is present in AD group inside Sharepoint Group Sharepoint Online

That data isn't stored in SharePoint, it's stored in Active Directory. So you'll need to run some server-side code against your AD to get that.
Derek Gusoff's user avatar
  • 8,036
3 votes

Display online users (SPO)

Thank you for the answer Hardik. The topic you linked to seems to be the best and only example of doing this. Even though, I came up with another solution (an easier version of it), so I am posting ...
Gintas K's user avatar
  • 1,237
3 votes

How to post value in multiple user field via SharePoint REST API

For posting multi user field the format we should use is FieldName: {"results": [UserId1,UserId2....] } From people picker control you can get the user ids as explained in the msdn article https://...
Amal Hashim's user avatar
  • 28.3k
3 votes

Get all users in js

I guess you have used the following to retrieve the User Profiles: https://<your site URL>/_api/web/siteusers In order to achieve this, you can simply use SharePoint Search Rest API. All you ...
Anand's user avatar
  • 1,745
3 votes
Accepted

User adding working, but permissions setting is not woring - CSOM

If you only want to add a user to a group, then do this: ClientContext client = new ClientContext("SiteURL"); Web web = client.Web; Group group = web.SiteGroups.GetByName("test Members"); User user =...
Mihail's user avatar
  • 2,079
3 votes
Accepted

Get SPListItem ItemsData

This code should work: (web is a variable that references the web object) SPFieldUserValue value = new SPFieldUserValue(web, item["AssignedTo"].ToString()); if (value) { ...
Ahmed Mahmoud's user avatar
3 votes

Use Current User's Credentials for SharePoint Online C#

I've read a few articles about the topic linked here and a bit curious no one yet has mentioned yet the Windows Credentials Manager. This is my code to read/write from SharePoint from an application ...
EricBDev's user avatar
  • 131
3 votes
Accepted

Username's skype status is showing "Presence unknown" on a site collection, while it is working well on the other site collections

Each SiteCollection stores information about users in the hidden User Information List. Your problem should exist in the SipAddress attribute of the user. You can confirm this with the following ...
MHeld's user avatar
  • 5,123
2 votes
Accepted

SP2013 and O365 : how to get user's followed sites ? SocialDataStoreException 2

Based on the error status, SharePoint is saying no personal site exists for the user. Did you check whether Mysites is properly configured and you are able to access the page? I have faced the same ...
Karvannan's user avatar
  • 176
2 votes

Remove User from a Site through CSOM

I had a similar issue where I had to just remove a specific user from the site (Web). Following code did it: var roleAssignments = clientContext.Web.RoleAssignments; ctx.Load(roleAssignments, r =>...
Abbas's user avatar
  • 159
2 votes

How can I display the current SharePoint user from a c# Web Form hosted on IIS

Your website is running outside of SharePoint and as such does not have SharePoint context. It knows nothing about anything going in SharePoint. I f you instantiate a new SPSite object from outside ...
Colin's user avatar
  • 4,665
2 votes

Get SPListItem ItemsData

You can try below code to get SPUser in AssignedTo columns for specific item. If(task["Assigned To"] != null) { string fieldValue = Convert.ToString(task["Assigned To"]); SPFieldUserValue ...
Hardik's user avatar
  • 7,733
2 votes

Get SPListItem ItemsData

Try this SPFieldUserValue userField = item.Fields["AssignedTo"] as SPFieldUser; string userName = item["AssignedTo"].ToString(); SPFieldUserValue fieldValue = (SPFieldUserValue)userField....
Erin L's user avatar
  • 4,028
2 votes

Get SPListItem ItemsData

You can try below code, using (SPSite siteCol = new SPSite("http://server/sites/Contoso")) { using (SPWeb web = siteCol.RootWeb) { SPList list = web.GetList("/...
Niranjan Kulkarni's user avatar
2 votes

Aggregating User's Tasks in SharePoint 2013

This is what the Work Management Service is for. On the User Profile Tasks page it accumulates the tasks from SharePoint, Project Server Sites and Exchange 2013 (if you have that and it's connected). ...
Matthew McDermott's user avatar
2 votes
Accepted

SPServices.SPGetCurrentUser does not work on subsite level?

It will not work as it is already mentioned in Codeplex comments & there is no solution mentioned over there as well. You need to make standard ajax call but it will give you XML with having all ...
Hardik's user avatar
  • 7,733
2 votes

SP13 - Cannot add user as farm administrator

You have to do it in Internet Explorer AND run it as an administrator or it fails every time. Even in SharePoint 2016. So if you set your prefered browser to Chrome and run Central Administration via ...
nejcs's user avatar
  • 21
2 votes

How to get current User's group using Client object model C#

using( ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection")); { #Get Group Collection GroupCollection collGroup = clientContext.Web.SiteGroups; ...
Akshay Dattatray Nangare's user avatar
2 votes

SharePoint 2016 UserProfileApplicationProxy Proxy is null

Apologies, I have now sorted this. The User Profile Service Application Proxy was not associated with the web application.
user3853001's user avatar
2 votes
Accepted

SPO - How to autofill( ClientPicker in SPHosted-AddIn with JSOM

If you want to set the value in client people picker, You will need below things. --Client Side People Picker Id --Account Id or Email of User/group which you want to set in client side people picker ...
Samir Khimani's user avatar
2 votes
Accepted

Everyone group doesn't include all my users from AD

We had same issue and as per our analysis we came to know that this is a LogonTokenService cache issue. We followed below steps in order to know. Did full user profile synch Wait for 24 hours to ...
Venkat Konjeti's user avatar
2 votes
Accepted

How to display current logged in user name without any server call in master page?

In order to display stuff without querying the server, you will have to use objects that are already available in the context of the page. you have for example the user id, but not the user full name....
Tiago Duarte's user avatar
  • 5,477
2 votes
Accepted

When a new user is added to a SharePoint Website what happens in background?

When we give a user permission to the site collection, or when that user creates/updates/deletes any item within a Site Collection, the user will be added to the Hidden User information List which ...
Hellofiona_MSFT's user avatar
2 votes
Accepted

Default control of user profile

Are you doing this in SharePoint or outside? The Profile Card is built from JavaScript hosted in SharePoint. You can pass parameters to the getUserPersona function, but recreating the card outside of ...
Matthew McDermott's user avatar
2 votes
Accepted

Problem with User ID in different UserInformationList queries

That is because users get new IDs on each Site Collections. A user might have ID 173 on one Site Collection but ID 46095 on another. If you have sites located at the /sites managed path, then that ...
Ganesh Sanap - MVP's user avatar
2 votes

Fetching the list of users who have permission to use SharePoint page

to get permissions on SharePoint page by SP rest Api You may use the fallowing request: .../_api/web/GetFileByServerRelativeUrl('[RELATIVE URL OF PAGE]')?$expand=ListItemAllFields/RoleAssignments/...
Adam's user avatar
  • 251
2 votes

How to get SharePoint site usage report at individual user level?

If you are not an admin of your tenant, then you are not able to access any usage data. It is a by-design behavior in SharePoint Online. And the raw audit data in Admin center has access logs with all ...
Jerry_MSFT's user avatar
  • 4,230
1 vote

User profile - mapping AD & ADFS

I'm not sure I understand this correctly, but from your description I'm guessing you probably implemented ADFS in an existing farm, where users already exist. While doing so you ended up with ...
Benny Skogberg's user avatar
  • 25.5k

Only top scored, non community-wiki answers of a minimum length are eligible