|
| 1 | +--- |
| 2 | +id: managing-service-accounts |
| 3 | +title: Managing Service Accounts |
| 4 | +sidebar_label: Managing Service Accounts |
| 5 | +--- |
| 6 | + |
| 7 | +import useBaseUrl from '@docusaurus/useBaseUrl'; |
| 8 | +import Tabs from '@theme/Tabs'; |
| 9 | +import TabItem from '@theme/TabItem'; |
| 10 | + |
| 11 | +<p><span className="sauceGreen">Paid Plans Only</span></p> |
| 12 | + |
| 13 | +:::note |
| 14 | +Service accounts are available only on paid plans. Free trial accounts cannot create service accounts. |
| 15 | +::: |
| 16 | + |
| 17 | +## Overview |
| 18 | + |
| 19 | +Service accounts are non-human accounts designed for automated processes such as CI/CD pipelines and integrations. |
| 20 | + |
| 21 | +:::tip |
| 22 | +Throughout this documentation, non-human accounts will always be referred to as **service accounts**. In contrast, accounts associated with individual users and linked to an email address will be referred to as **users** or **user accounts**. |
| 23 | +::: |
| 24 | + |
| 25 | +Service accounts can be managed by any team administrator in their active team or any organization administrator. |
| 26 | + |
| 27 | +Unlike user accounts, service accounts: |
| 28 | + |
| 29 | +- Are not tied to a specific user and remain functional even if the creator is deleted. |
| 30 | +- Cannot switch teams after creation. |
| 31 | + |
| 32 | +Key characteristics: |
| 33 | + |
| 34 | +- **No UI or SAML SSO Sign-In:** Service accounts cannot log in to the Sauce Labs UI or via SAML Single Sign-On. |
| 35 | +- **No Email Notifications:** They do not have an email address and will not receive notifications. |
| 36 | +- **Credentials for Automation:** They use a username and access key for API access and running tests as user accounts. |
| 37 | +- **Team Assignment:** Once created, a service account is tied to a specific team and cannot be reassigned. |
| 38 | +- **Limited Permissions:** Service accounts have limited permissions compared to user accounts, amongst others they **cannot**: |
| 39 | + - manage teams and accounts ([Accounts API](/dev/api/accounts/)) |
| 40 | + - manage tunnels with Sauce Trusted Connection ([Sauce Connect API](/dev/api/connect/), [SC CLI 4](/dev/cli/sauce-connect-proxy), [SC CLI 5](/dev/cli/sauce-connect-5)) |
| 41 | + - manage private real devices ([Private Real Device API](/dev/api/rdc/#private-real-device-management)) |
| 42 | + - use the [API Testing API](/dev/api/api-testing/) |
| 43 | + - submit a crash in the [Crash/Error Reporting](/dev/api/error-reporting/) |
| 44 | + - use the [Sauce Orchestrate](/orchestrate) |
| 45 | + - use the [Virtual USB CLI](/dev/cli/virtual-usb/) |
| 46 | + |
| 47 | +## Creating a Service Account |
| 48 | + |
| 49 | +### As a Team Administrator |
| 50 | + |
| 51 | +1. Click the **Account icon** <img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/account-icon.png')} alt="Account Icon" /> in the top-right corner and select **Team management**. |
| 52 | +2. Navigate to the **Service Accounts** tab. |
| 53 | +3. Click **+ New Service Account**. |
| 54 | +4. Enter a **Display name** and verify the **Assigned Team**: |
| 55 | + - The username is auto-generated based on the display name. |
| 56 | + - You can update the display name later, but the username remains fixed. |
| 57 | + - The service account is automatically assigned to your active team and cannot be reassigned later. |
| 58 | + <img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/creation-modal-team-admin-step-1.png')} alt="Service Account Creation - Step 1"/> |
| 59 | +5. Copy and securely store the username and the access key. |
| 60 | + - **Important:** The access key is available only during this step and cannot be retrieved later. |
| 61 | + <img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/creation-modal-team-admin-step-2.png')} alt="Service Account Creation - Step 2"/> |
| 62 | + |
| 63 | +### As an Organization Administrator |
| 64 | + |
| 65 | +1. Click the **Account icon** <img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/account-icon.png')} alt="Account Icon"/> in the top-right corner and select **Organization management**. |
| 66 | +2. Click the **Service Accounts** tab to manage all service accounts across your entire organization. |
| 67 | + - Alternatively, to manage service accounts for a specific team, select that team from the **Teams** tab and then click the **Service Accounts** tab. |
| 68 | +3. Click **+ New Service Account**. |
| 69 | +4. Enter a **Display name** and choose the appropriate **Assigned Team**: |
| 70 | + - The username is auto-generated based on the display name. |
| 71 | + - You can update the display name later, but the username remains fixed. |
| 72 | + - When managing service accounts at the organization level, you can assign the account to any team but it cannot be reassigned later. |
| 73 | + <img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/creation-modal-org-admin-step-1.png')} alt="Service Account Creation - Step 1"/> |
| 74 | +5. Copy and securely store the username and the access key. |
| 75 | + - **Important:** The access key is available only during this step and cannot be retrieved later. |
| 76 | + <img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/creation-modal-org-admin-step-2.png')} alt="Service Account Creation - Step 2"/> |
| 77 | + |
| 78 | +## Managing Service Accounts |
| 79 | + |
| 80 | +### Accessing the Service Account Details View |
| 81 | + |
| 82 | +- **Team Administrators:** Can manage service accounts only in their active team. Use [the team assignment dropdown list](/basics/acct-team-mgmt/switching-active-team) to switch teams. |
| 83 | +- **Organization Administrators:** Can manage service accounts across any team. |
| 84 | + |
| 85 | +#### As a Team Administrator |
| 86 | + |
| 87 | +1. Click the **Account icon** <img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/account-icon.png')} alt="Account Icon" /> in the top-right corner and select **Team management**. |
| 88 | +2. Click the **Service Account** tab. |
| 89 | +3. Click on the username of the service account you want to manage. |
| 90 | + |
| 91 | +#### As an Organization Administrator |
| 92 | + |
| 93 | +1. Click the **Account icon** <img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/account-icon.png')} alt="Account Icon"/> in the top-right corner and select **Organization management**. |
| 94 | +2. Click the **Service Accounts** tab to manage all service accounts across your entire organization. |
| 95 | + - Alternatively, to manage service accounts for a specific team, select that team from the **Teams** tab and then click the **Service Accounts** |
| 96 | +3. Click on the username of the service account you want to manage. |
| 97 | + |
| 98 | +### Deleting a Service Account |
| 99 | + |
| 100 | +1. Open the [service account details view](#accessing-the-service-account-details-view). |
| 101 | +2. Click the delete button. |
| 102 | + <br/><img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/delete-button.png')} alt="Delete button"/> |
| 103 | +3. Confirm the deletion. |
| 104 | + |
| 105 | +### Deleting Service Accounts in Bulk |
| 106 | + |
| 107 | +1. Open the [service account details view](#accessing-the-service-account-details-view). |
| 108 | +2. Select the checkboxes next to the service accounts you want to delete. |
| 109 | +3. From the dropdown menu, choose **Delete service accounts**. |
| 110 | + <br/><img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/delete-service-accounts-dropdown.png')} alt="Delete service accounts dropdown"/> |
| 111 | + |
| 112 | +### Resetting the Access Key |
| 113 | + |
| 114 | +1. Open the [service account details view](#accessing-the-service-account-details-view). |
| 115 | +2. Click the reset access key button. |
| 116 | + <br/><img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/reset-access-key-button.png')} alt="Reset access key button"/> |
| 117 | +3. Confirm the reset action. |
| 118 | +4. Copy and securely store the new access key. |
| 119 | + - **Important:** The access key is available only during this step and cannot be retrieved later. |
| 120 | + <img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/reset-access-key-step-2.png')} alt="Reset access key - Step 2"/> |
| 121 | + |
| 122 | +### Updating the Display Name |
| 123 | + |
| 124 | +1. Open the [service account details view](#accessing-the-service-account-details-view). |
| 125 | +2. Edit the display name field. |
| 126 | + <br/><img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/update-display-name.png')} alt="Update display name"/> |
| 127 | +3. Click the **Update** to save your changes. |
| 128 | + <br/><img src={useBaseUrl('img/basics/acct-team-mgmt/service-accounts/update-button.png')} alt="Update button"/> |
| 129 | + |
| 130 | +:::note |
| 131 | +Changing the display name does not affect the auto-generated username. |
| 132 | +::: |
| 133 | + |
| 134 | +## Running Tests as a Service Account |
| 135 | + |
| 136 | +You can run tests as a service account in the same way you would with a user account - use the service account's username and access key. |
| 137 | + |
| 138 | +### Viewing Test Results |
| 139 | + |
| 140 | +Jobs run by service accounts are displayed on the [Automated Test Results page](/test-results/viewing-test-results/#automated-test-results). The visibility and permissions for jobs and builds run by service accounts are the same as those for user accounts: |
| 141 | + |
| 142 | +- **When "Job Visibility Across Teams" is enabled** in the [Organization Security Settings](/basics/acct-team-mgmt/org-settings/#security-settings): |
| 143 | + Users and service accounts across all teams in your organization can view jobs and builds from any team. |
| 144 | +- **When "Job Visibility Across Teams" is disabled:** |
| 145 | + Users and service accounts can only view jobs and builds associated with their active team. |
| 146 | + |
| 147 | +### Using Sauce Connect Proxy with a Service Account |
| 148 | + |
| 149 | +If you plan to run tests through a [Sauce Connect Proxy tunnel](/secure-connections/), be mindful of tunnel sharing options. Service accounts cannot create or manage tunnels, so you must use a tunnel that has been shared with the service account’s assigned team. For detailed configuration instructions, refer to the [shared tunnels section](/secure-connections/sauce-connect-5/operation/overview/#shared-tunnels). |
0 commit comments