Run a workbook with service account credentials
If you use OAuth to connect to your data platform, you might want some workbooks to run using service account credentials instead of as the individual users viewing the workbook. For example, if your workbook contains critical scheduled exports and materializations owned by a user that inconsistently accesses the workbook. If that user’s OAuth token expires, the exports and materializations fail to run.
Running a workbook with service account credentials can also improve performance for users on connections authenticated with OAuth using a result cache.
When queries run with individual OAuth credentials, Sigma does not reuse cached results from the query ID cache or the universal result cache. Running as a service account allows Sigma to reuse cached query results, which improves performance. Cached results from queries run as a service account can return results that don’t match the permissions of a users’ individual OAuth credentials. For more information, see Caching and data freshness.
You can set a workbook to run using service account credentials in one of two ways, depending on the configuration of the OAuth connection to your data platform used for the workbook data sources:
- The connection uses the same OAuth configuration as the one used to log in to your Sigma organization (organization-level OAuth): A user assigned the Admin account type, or the workbook owner when their account type includes the Run workbooks as service account permission, can configure the workbook to run queries using the service account configured on the connection. See the requirements and setup instructions.
- The connection uses an OAuth configuration specific to the connection (connection-level OAuth): A user with access to edit the workbook can swap the data source of the workbook to a different connection configured with service account credentials.
When you turn on Run as service account, Sigma runs queries on each OAuth connection in the workbook with the service account configured for that connection. If an OAuth connection has no service account configured, queries on that connection fail, and Sigma displays an error. For data from a non-OAuth connection, Sigma evaluates the workbook owner’s access to the source data.
If you choose to run a workbook using service account credentials, Sigma queries data and evaluates permissions for the workbook differently. Refer to the following table to compare the behavior across different settings:
Requirements
-
To configure this setting, you must have the Admin account type or own the workbook and have an account type with the Run workbooks as service account permission. See Account type and license overview.
-
The Run as service account option is available for any workbook when your organization has an active OAuth connection configured. If you turn it on for an OAuth connection with no service account configured, queries on that connection fail. For information on how to configure a service account for a connection, see:
Run an individual workbook as a service account
- Open the workbook.
- Click the down arrow (
) to open the workbook menu.
- Select Share….
- Turn on the Run as service account toggle.

