SP.User.userId property (sp.js)
Gets the information of the user that contains the user's name identifier and the issuer of the user's name identifier.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
var value = SP.User.get_userId ()
Return value
The information of the user that contains the user's name identifier and the issuer of the user's name identifier. null if the identity provider's unique identifier cannot be constructed.
REST resource endpoint
See User resource for more information.
Endpoint URI structure
http://<sitecollection>/<site>/_api/web/sitegroups(groupid)/users(loginname)/userId
HTTP requests
This resource supports the following HTTP commands:
- POST
POST syntax
POST http://<sitecollection>/<site>/_api/web/sitegroups(groupid)/users(loginname)/userId
GET syntax
GET http://<sitecollection>/<site>/_api/web/sitegroups(groupid)/users(loginname)/userId