Function requestPrivilegedRoleSwitch

  • Used to request a role switch to a privileged role. Requires a user to authenticate the request.

    Parameters

    • user: UserId | User

      The user to request the role switch for.

    • newRole: Role

      The new role to switch to.

    • callbackUrl: string

      The URL to redirect the user to after the request is processed.

    • Optionalreason: string

      An optional (but highly recommended) reason for the role switch request. Shows to the user when they authenticate the request.

    Returns Promise<RoleChangeRequest>

    The session change request with an authentication URL for the user to visit.