How to Embed Credentials in Tableau

Cody Schneider9 min read

Embedding credentials in Tableau shifts your dashboards from static reports into automated, always-on data sources that refresh themselves. This simple setting is the key to creating a hands-off reporting system that works around the clock without requiring you to manually sign in. This tutorial will walk you through exactly how and when to embed credentials for both published data sources and individual workbooks, ensuring your team always has access to the most current data.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

Why Embed Credentials in the First Place?

The primary reason to embed credentials is for automation. When you publish a workbook to Tableau Server or Tableau Cloud, you want the underlying data to be updated automatically on a schedule with a connection to live data that viewers can access seamlessly. If credentials aren't embedded, an automatic refresh will fail because Tableau has no way to log into the source database on its own.

Imagine a daily sales dashboard that's supposed to refresh at 7 AM every morning. If the authentication is set to "Prompt user," the refresh will fail because there is no user present to enter a password. The dashboard will show stale data until someone manually logs in and triggers the update.

Embedding credentials solves this by securely storing a username and password within the data source's connection settings on Tableau Server. When a scheduled refresh kicks off, Tableau uses these stored credentials to log into the database, pull the latest data, and update your visualizations. This makes your reports self-sufficient.

The main benefits boil down to:

  • Scheduled Refreshes: Allows for automated, hands-free updates of your data extracts. Your dashboards are always up-to-date without any manual intervention.
  • Seamless Viewer Experience: Your colleagues or clients can view a dashboard without ever being asked for database passwords. They don't need direct access to the underlying database, only to the Tableau view. This simplifies access and enhances security.
  • Centralized Access Control: You manage one saved credential for the data source instead of worrying about every single viewer's database permissions.

Before You Get Started: Prerequisites

Before you jump into the settings, make sure you have a few things in order to make the process smooth. Missing any of these will likely block your progress.

  • 1. Access to Tableau Server or Tableau Cloud: Embedding credentials is a server-side setting. You cannot do this within Tableau Desktop alone. You need to be able to sign in to your organization's Tableau environment with publishing rights.
  • 2. A Published Workbook or Data Source: This process is done on content that has already been published from Tableau Desktop to your Tableau server.
  • 3. A Dedicated Database User Account (A "Service Account"): This is the most crucial part and a widely followed best practice. Instead of embedding your personal database login, you should use a generic "service account."

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Why Use a Service Account?

A service account is a dedicated user account created in your database (like Snowflake, Redshift, SQL Server, etc.) specifically for applications like Tableau to use. Here’s why it’s so important:

  • It's not tied to an individual. If you use your personal credentials and you leave the company, or your password changes, every single data refresh tied to your account will fail. A service account prevents this chaos because it's managed independently.
  • Scoped permissions. You can grant this service account read-only access to the specific tables and views Tableau needs. This is much more secure than embedding a personal account that might have broader administrative privileges.

You may need to ask your database administrator or IT department to create one for you. Get the username and password ready for the next steps.

How to Embed Credentials in a Published Data Source

Publishing a data source separately in Tableau is the recommended approach for any data that will be used across multiple workbooks. Centralizing it this way means you only have to update the connection and credentials in one place. Here’s how to embed credentials on a separately published data source.

Step-by-Step Instructions:

1. Sign in to Tableau Server or Tableau Cloud. Using your web browser, navigate to your Tableau site and log in with your account.

2. Navigate to your Data Source. Once you're logged in, use the "Explore" section on the left-hand navigation pane to find your projects and locate the specific data source you want to update. It will have a cylinder icon next to it.

3. Open the "Edit Connection" Menu. Find your data source, click the three dots (...) actions menu to its right, and select "Edit Connection" from the dropdown list. This opens a dialog box where you can manage authentication settings.

4. Change the Authentication Setting. Inside the "Edit Connection" window, you will see a section for "Authentication." By default, it is often set to "Prompt user for username and password." Click on the dropdown menu.

5. Select "Embedded password". Change the selection to "Embedded password". This will reveal fields where you can enter the username and password.

6. Enter the Service Account Credentials. Carefully type in the username and password for the dedicated database service account you prepared earlier.

7. Test the Connection. Before saving, always click the "Test Connection" button. Tableau will attempt to log in to your database with the credentials you provided. If it's successful, you’ll see a green checkmark with a "Connection successful" message. If not, you'll get an error, which usually means there's a typo in the credentials or a firewall is blocking the connection.

8. Save Your Changes. Once the connection test passes, click the blue "Save" button. That's it! Your data source is now configured for automated refreshes. You can go to the "Extract Refreshes" tab and set up a new schedule, confident that it will work without manual intervention.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

How to Embed Credentials in a Workbook

Sometimes, a data source isn't published separately and is instead embedded directly within a workbook. The process for setting up credentials is very similar, but you access the settings through the workbook itself. This is common for ad-hoc reports or dashboards that use a unique data connection not shared elsewhere.

Step-by-Step Instructions:

1. Navigate to the Workbook. After logging into Tableau Server/Cloud, find the workbook you need to update.

2. Go to the "Data Sources" Tab. Open the workbook. At the top of the workbook's page, you’ll see several tabs like "Views," "Data Sources," etc. Click on the "Data Sources" tab.

3. Edit the Connection. You will now see a list of all data sources used by this workbook. Look for the data source that needs credentials and click "Actions," then "Edit Connection." If you have multiple sources, you will need to do this for each one that requires a login.

4. Embed Credentials and Save. The same "Edit Connection" dialog box will appear. Follow the same steps as before:

  • Change authentication from "Prompt user" to "Embedded password."
  • Enter the service account username and password.
  • Click "Test Connection" to validate.
  • Click "Save."

Now, any extract refresh schedules associated directly with this workbook will be able to run automatically.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Best Practices and Common Troubleshooting

Mastering the "how" is great, but knowing the "why" and "what if" is even better. Here are a few tips to prevent common issues.

When to Prompt vs. When to Embed?

While embedding credentials is the go-to for automated reports, there are specific situations where prompting the user is the correct choice.

  • Embed Credentials: Use for 95% of use cases – any shared dashboard where you want a seamless experience for viewers and automated refreshes. Examples include executive summaries, KPIs, department overviews, and dashboards shared via subscription.
  • Prompt a User (Live Connection only): Use this when you need to enforce database-level row-level security. For instance, if you have a dashboard for the sales team, and each sales representative should only see their accounts, you could configure this in the database itself. By having Tableau prompt each rep for their personal database login, the database handles filtering the data for them upon login. This is a more advanced case and only works for new dashboards.

Troubleshooting Failed Connections

What if your connection test or scheduled refresh fails? Here are the most common culprits:

  1. Incorrect Username or Password: The most frequent issue. Double-check for typos, case-sensitivity issues, or extra spaces.
  2. Expired Password: Many organizations have password policies that force rotation every 90 days. Make sure the service account password hasn't expired. This is a common cause of refreshes that suddenly break after working perfectly for months.
  3. Permissions Denied: The service account may not have the necessary "SELECT" permissions on the new schema and tables in the database where you need credentials configured. Work with your DBA's team owner to make sure you have the required credentials and connect with them for access.
  4. Firewall or Network Issues: Your Tableau Server must be able to reach your database. If the database is on-premise and Tableau is in the cloud, you'll need to make provisions for network access, often by allowing Tableau's IP address in your firewall rules. Firewalls sometimes block communication by default.

Final Thoughts

Embedding credentials is a small step in Tableau's setup that makes a monumental difference in usability and automation. By securely saving a dedicated service account's login information, you empower your published dashboards to update themselves, ensuring everyone on your team always has timely, reliable data without needing to enter a password.

Setting up refresh schedules and managing database connections can get complex, especially when you're pulling data from not just one database, but dozens of marketing and sales platforms. We built Graphed to automate all that tedious work. Instead of handling refresh schedules and connection permissions, we let you connect sources like Google Analytics, Facebook Ads, Shopify, and Salesforce with one click. From there, you just describe the dashboard you want in plain English, and our AI builds it in seconds, with all the data updating in real-time.

Related Articles