Share via


SP.RoleDefinitionCollection.getByName Method (sp.js)

Gets the role definition with the specified name.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

SP.RoleDefinitionCollection.getByName()

Parameters

  • name
    Type: String

    The name of the role definition.

Return value

Type: SP.RoleDefinition

The role definition.

Remarks

This method gets the role definition with the name specified by name in the collection.

REST resource endpoint

See RoleDefinitionCollection resource for more information.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/roledefinitions/getByName(name)

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/web/roledefinitions/getByName(name)

Resource parameters

  • name