--- title: companyContactAssignRoles - GraphQL Admin description: Assigns roles on a company contact. api_version: 2025-10 api_name: admin type: mutation api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/mutations/companycontactassignroles md: https://shopify.dev/docs/api/admin-graphql/latest/mutations/companycontactassignroles.md --- # company​Contact​Assign​Roles mutation Requires `write_customers` access scope or `write_companies` access scope. Also: The API client must be installed on a Shopify Plus store. Assigns roles on a company contact. ## Arguments * company​Contact​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The contact whose roles are being assigned. * roles​To​Assign [\[Company​Contact​Role​Assign!\]!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CompanyContactRoleAssign) required The new roles to assign. *** ## Company​Contact​Assign​Roles​Payload returns * role​Assignments [\[Company​Contact​Role​Assignment!\]](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContactRoleAssignment) A list of newly created assignments of company contacts to a company location. * user​Errors [\[Business​Customer​User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/BusinessCustomerUserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### companyContactAssignRoles reference ## Mutation Reference ```graphql mutation companyContactAssignRoles($companyContactId: ID!, $rolesToAssign: [CompanyContactRoleAssign!]!) { companyContactAssignRoles(companyContactId: $companyContactId, rolesToAssign: $rolesToAssign) { roleAssignments { # CompanyContactRoleAssignment fields } userErrors { field message } } } ``` ## Input ##### Variables ```json { "companyContactId": "gid://shopify//10079785100", "rolesToAssign": [ { "companyContactRoleId": "gid://shopify//10079785100", "companyLocationId": "gid://shopify//10079785100" } ] } ``` ##### Schema ```graphql input CompanyContactRoleAssign { companyContactRoleId: ID! companyLocationId: ID! } ```