> ## 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.

# Create Default Role Entity

> Loading default values into a new RoleEntity.

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/CreateDefaultRoleEntity
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/CreateDefaultRoleEntity:
    post:
      tags:
        - User_Agent
      summary: Create Default Role Entity
      description: "Loading default values into a new RoleEntity.\n\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_CreateDefaultRoleEntity
      parameters:
        - name: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          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
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.RoleEntity'
            text/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.RoleEntity'
            application/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.RoleEntity'
            text/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.RoleEntity'
            application/json-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.RoleEntity'
            application/merge-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.RoleEntity'
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.CRM.Services.RoleEntity:
      description: "Carrier object for RoleEntity.\r\nServices for the RoleEntity Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IUserAgent\">User Agent</see>."
      type: object
      properties:
        RoleId:
          format: int32
          description: Primary key
          type: integer
        Name:
          description: Visible role name
          type: string
        Tooltip:
          description: Description of the role.
          type: string
        RoleType:
          description: >-
            The role type. Note that changing this field has no effect, so treat
            this as a read-only field.
          enum:
            - Employee
            - ExternalUser
            - Anonymous
            - System
          type: string
        Deleted:
          format: int32
          description: 1 if role has been deleted (we do not actually delete)
          type: integer
        Rank:
          format: int32
          description: Sorting rank of this role in lists
          type: integer
        Created:
          format: date-time
          description: Registered when  in UTC.
          type: string
        UseCategories:
          format: int32
          description: Apply role category membership to users
          type: integer
        CreatedBy:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.Associate'
        Updated:
          format: date-time
          description: Last updated when  in UTC.
          type: string
        UpdatedBy:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.Associate'
        DataRights:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.DataRights'
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.Associate:
      description: "Carrier object for Associate.\r\nServices for the Associate Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IAssociateAgent\">Associate Agent</see>."
      type: object
      properties:
        AssociateId:
          format: int32
          description: Primary key
          type: integer
        Name:
          description: Initials, also login name, possibly database user name
          type: string
        PersonId:
          format: int32
          description: "Owning person record \r\n<para>Use MDO List name \"person\" to get list items.</para>"
          type: integer
        Rank:
          format: int32
          description: Rank order
          type: integer
        Tooltip:
          description: Tooltip or other description
          type: string
        Type:
          description: >-
            User type - 1 = internal user, 2 = resource, 3 = external user, 4 =
            anonymous, 5 = system
          enum:
            - Unknown
            - InternalAssociate
            - ResourceAssociate
            - ExternalAssociate
            - AnonymousAssociate
            - SystemAssociate
          type: string
        GroupIdx:
          format: int32
          description: >-
            Primary group membership, see UserGroupLink for secondary
            memberships
          type: integer
        FullName:
          description: >-
            The associate's culture formatted fullname (firstname, middleName
            and lastname)
          type: string
        FormalName:
          description: >-
            The associate's culture formatted formalname (firstname, middleName
            and lastname, title, mrmrs)
          type: string
        Deleted:
          description: >-
            If true, the user is retired and should have no rights, not appear
            in lists, etc.
          type: boolean
        EjUserId:
          format: int32
          description: >-
            ID of the ej user record corresponding to this associate; 0 for
            associates that are not ej users
          type: integer
        UserName:
          description: User name
          type: string
        ExtraFields:
          description: "Deprecated: Use {SuperOffice.CRM.Services.Associate.CustomFields} instead.\r\nExtra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc."
          type: object
          additionalProperties:
            type: string
        CustomFields:
          description: "Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin.\r\nCustom fields combines user defined fields and extra fields into one bucket. \r\nThe individual {SuperOffice.CRM.Services.Associate.ExtraFields} and <see cref=\"!:UserDefinedFields\">UserDefinedFields</see> properties are deprecated in favor of this\r\ncombined collection."
          type: object
          additionalProperties:
            type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.DataRights:
      description: "Carrier object for DataRights.\r\nServices for the DataRights Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IUserAgent\">User Agent</see>."
      type: object
      properties:
        ColumnsInfo:
          description: ''
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.RelationToOwner'
        RowsInfo:
          description: ''
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.EntityName'
        Rights:
          description: ''
          type: array
          items:
            type: array
            items:
              $ref: '#/components/schemas/SuperOffice.CRM.Services.DataRight'
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Security.TableRight:
      description: "Wraps a table right together with an explanatory reason.\r\nCode can indicate why access is restricted."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string
    SuperOffice.CRM.Security.FieldProperty:
      description: >-
        Class holding properties like field length, field type about a field in
        the carrier.
      type: object
      properties:
        FieldRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldRight'
        FieldType:
          type: string
        FieldLength:
          format: int32
          description: ''
          type: integer
    SuperOffice.CRM.Services.RelationToOwner:
      description: "Carrier object for RelationToOwner.\r\nServices for the RelationToOwner Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IUserAgent\">User Agent</see>."
      type: object
      properties:
        Id:
          format: int32
          description: The List Item Id
          type: integer
        Value:
          description: The List Item Value
          type: string
        Tooltip:
          description: The List Item Tooltip
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.EntityName:
      description: "Carrier object for EntityName.\r\nServices for the EntityName Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IUserAgent\">User Agent</see>."
      type: object
      properties:
        TableName:
          description: The name of the table in the database
          type: string
        TableDescription:
          description: Name to be used in GUI, preferable a resource string
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Services.DataRight:
      description: "Carrier object for DataRight.\r\nServices for the DataRight Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IUserAgent\">User Agent</see>."
      type: object
      properties:
        Value:
          description: ''
          type: string
        Description:
          description: ''
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Security.FieldRight:
      description: "Wraps the field right together with an explanatory reason.\r\nAlso adds logical operators to the field rights so that they can be easily combined."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string

````

## Related topics

- [Create Default Role Entity From Type](/en/api/reference/restful/rest/role/create-default-role-entity-from-type.md)
- [Default Role Entity](/en/api/reference/restful/rest/role/default-role-entity.md)
- [SuperOffice.WebApi.Data.User CreateDefaultRoleEntityFromTypeRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.User_CreateDefaultRoleEntityFromTypeRequest.md)
- [NSUserAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSUserAgent.md)
- [SuperOffice.WebApi.Agents.IUserAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IUserAgent.md)
