0

My requirement is to maintain a flag value (eg., 1. whether logged in user subscribed or not 2.whether logged in user voted or not 3. etc.,) for each users in our org, so I planned to make use of SiteUserInfoList, having separate column for each flags.
Can anyone help on creating (using CSOM/JSOM) custom column on SiteUserInfoList in SharePoint online and accessing the same using CSOM/JSOM? Alternate for using SiteUserInfoList also fine.

Appreciate your help in advance.

1

Yes, you can add a column in SiteUserInfoList but the best practice will be using a separate list for managing these types of information.

Tips: Using REST API

End-point

{your site}/_api/web/SiteUserInfoList/Fields

Request Body

{
  "__metadata": {
    "type": "SP.Field"
  },
  "Title": "Is Subscribed", //Your field name
  "FieldTypeKind": 8, // For boolean it is 8
  "TypeAsString": "Boolean",
  "TypeDisplayName": "Yes/No"
}

Make a POST request to the above endpoint. You can use my tool to do this.

enter image description here

Get All users from SiteUserInfoList

{your site url}/_api/web/SiteUserInfoList/Items

Make a GET request to the above endpoint.

0

You probably can - but you should not modify SiteUserInfoList.
What you should do - if this is a setting that is needed across all users - is to add a new property to the user-profile.

  • Thank you. This is for specific site collection, I decided not to change at User Profile. Finally decided to put it in separate list.!! – Srini K Aug 4 '17 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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