> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Data Right

> Set one specific data right at the given position.

An exception will be thrown if non existing position is specified.
NsApiSlow threshold: 2000 ms.
<para />## Online Restricted: ## The User agent is not available in Online by default. User management is not allowed for partner apps.



## OpenAPI

````yaml /openapi/agent/openapi-v3-UserAgent.json post /api/v1/Agents/User/SetDataRight
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - UserAgent
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Agents/User/SetDataRight:
    post:
      tags:
        - User_Agent
      summary: Set Data Right
      description: "Set one specific data right at the given position.\n\nAn exception will be thrown if non existing position is specified.\r\nNsApiSlow threshold: 2000 ms.\r\n<para />## Online Restricted: ## The User agent is not available in Online by default. User management is not allowed for partner apps."
      operationId: v1UserAgent_SetDataRight
      parameters:
        - name: $select
          in: query
          description: >-
            Optional comma separated list of properties to include in the
            result. Other fields are then nulled out to reduce payload size:
            "Name,department,category". Default = show all fields.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.UserCarriers.SetDataRightRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.UserCarriers.SetDataRightRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.UserCarriers.SetDataRightRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.UserCarriers.SetDataRightRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.UserCarriers.SetDataRightRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.UserCarriers.SetDataRightRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.UserCarriers.SetDataRightRequest
        description: RoleId, TableName, RelationToOwner, DataRightValue
        required: true
      responses:
        '204':
          description: No Content
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.UserCarriers.SetDataRightRequest:
      description: >-
        SetDataRight: Set one specific data right at the given position. An
        exception will be thrown if non existing position is specified.
      type: object
      properties:
        RoleId:
          format: int32
          type: integer
        TableName:
          type: string
        RelationToOwner:
          enum:
            - MyOwn
            - PrimaryGroup
            - OtherAssociates
            - OtherGroups
            - ExternalUser
            - Anonymous
            - MyCompany
            - SameProject
            - CustomObjects
          type: string
        DataRightValue:
          type: string

````

## Related topics

- [Set Data Right](/en/api/reference/restful/rest/role/set-data-right.md)
- [Set data rights for a role](/en/admin/user-management/role/set-data-rights-for-role.md)
- [SuperOffice.WebApi.Data.User SetDataRightRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.User_SetDataRightRequest.md)
- [Functional rights in SuperOffice](/en/admin/user-management/role/functional-rights.md)
- [NSDataRights](/en/automation/crmscript/reference/CRMScript.NetServer.NSDataRights.md)
- [NSDataRight](/en/automation/crmscript/reference/CRMScript.NetServer.NSDataRight.md)
