OneDrive and SharePoint Online
This article describes how to connect Tableau to OneDrive and SharePoint Online document library data, and how to set up the data source.
Beginning with Tableau version 2024.2, the OneDrive and SharePoint Online connector supports tenant-specific and custom connections. For previous versions (2024.1 and older), the application connection on the Microsoft side needs to be configured as multi-tenant for connections to Tableau to work properly.
Before you begin
Before you begin, complete the following tasks:
- Get the email address and password for your Microsoft account.
- Add Delegated Permission for Microsoft Graph API to Azure AD.
- Grant Tableau consent to use the following Application Programming Interface (API) permissions to access files in OneDrive and your SharePoint Online document libraries:
Files.Read.AllSites.Read.AllUser.Readoffline_access
- Locate and record your OAuth instance URL (endpoint) and your tenant ID.
- If you do not already have your Tenant ID, contact your Microsoft Entra administrator. For more technical information, see Find your app's OpenID configuration document URI(Link opens in a new window) in Microsoft Help.
- For information on determining your domain (endpoint), see Microsoft Entra authentication endpoints(Link opens in a new window).
- The format used by Tableau is
https://[endpoint]/[tenantID]. For example:https://login.microsoftonline.com/commonhttps://login.microsoftonline.com/690b6114-8fc7-4554-b27b-acc18e6fc5cd
Grant tenant-wide admin consent in Microsoft Entra ID
A Microsoft Entra administrator can grant consent for the whole organization to the application that Tableau uses to connect to OneDrive and SharePoint Online. If your tenant's user consent setting is Let Microsoft manage your consent settings, which is the default for new tenants, users can't consent to Files.Read.All or Sites.Read.All themselves. In that case, an administrator must grant consent before users can connect.
If the Tableau application is already provisioned in your tenant, for example after a user has consented to it, use Enterprise apps:
-
Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
-
Select Entra ID, select Enterprise apps, and then select All applications.
-
Search for [VERIFY: Tableau enterprise application name, pending Connectivity Auth and Security decision], and then select it.
-
Under Security, select Permissions.
-
Review the requested permissions. If you agree, select Grant admin consent.
For an OAuth client that your organization registered, such as a custom OAuth client, use App registrations:
-
In the Microsoft Entra admin center, browse to Entra ID and select App registrations and then select All applications.
-
Search for your application, and then select it.
-
Under Manage, select API permissions.
-
Review the requested permissions. If you agree, select Grant admin consent.
You can also grant consent by opening the admin consent URL. For the Microsoft Entra ID global service, the format is:
https://login.microsoftonline.com/{organization}/adminconsent?client_id={client-id}
Replace the placeholders as follows:
• {organization}: Your tenant ID or a verified domain name of your tenant. To use the home tenant of the administrator who signs in, enter organizations.
• {client-id}: The application (client) ID. For the Tableau application, use [VERIFY: Tableau client ID, pending Connectivity Auth and Security decision]. For your organization's own OAuth client, use its client ID.
For more information, see Grant tenant-wide admin consent to an application in the Microsoft documentation.
Disclaimer: Microsoft controls this product. These steps can change. For the current steps, see the Microsoft Entra documentation.
Recommendation
Set up a custom OAuth Client to use your company's IT policies
You can fully control your OAuth configuration according to your own IT policies with a custom OAuth client. The option to use your own OAuth client frees you from being tied to Tableau release cycles and Tableau’s OAuth client rotation schedule. For information on how to configure your own OAuth client, see Configure Azure AD for OAuth in the Tableau Server documentation and OAuth Connections(Link opens in a new window) in the Tableau Cloud documentation.
Make the connection and set up the data source
Note: Supported file types for use in Tableau are Excel, .csv/text, and JSON.
- Start Tableau and under Connect, select OneDrive and SharePoint Online. The OAuth Instance URL dialog will open, and you can do one of the following:
- To use the common OAuth authentication, leave the URL as the default (https://login.microsoftonline.com/common).
- To use a custom URL for authentication, enter the URL you have configured for Microsoft OAuth.

- In the tab Tableau opens in your default browser, do the following:
- Enter your email address and then select Next.
- Enter your password and then select Sign In.
- Select Yes to grant Tableau access to your OneDrive files and SharePoint Online document library files.
- Close the browser pane when notified to do so.
- Search for or select the file to connect to, and then select Connect. The file can be from one of three categories:
- OneDrive (personal files): files owned by you
- OneDrive (shared with you): files shared with you by another owner
Note: OneDrive (shared with you) is not available for OneDrive Personal accounts.
- SharePoint Sites: files in SharePoint Online document libraries that you have access to
- On the data source page, do the following:
- (Optional) Select the default data source name at the top of the page, and then enter a unique data source name for use in Tableau. For example, use a data source naming convention that helps other users of the data source figure out which data source to connect to.
- To start your analysis, select the sheet tab.
Note: Tableau doesn't support pivot tables in OneDrive or SharePoint Online document libraries.
Note: When you sign in, Tableau receives a refresh token from Microsoft. Microsoft sets a default lifetime of 90 days for refresh tokens and can revoke a refresh token earlier, for example because of a change in credentials or an action by the user or an administrator. After the refresh token expires or is revoked, sign in again to get a new one. For more information, see Refresh tokens in the Microsoft identity platform in the Microsoft documentation.
Use Data Interpreter to clean your data
If Tableau detects that it can help optimize your data source for analysis, it prompts you to use Data Interpreter. Data Interpreter can detect subtables you can use and remove unique formatting that can cause problems later on in your analysis. For information on data cleaning, see Clean Data from Excel, CSV, PDF, and Google Sheets with Data Interpreter.
Data Interpreter in Tableau Prep supports direct Microsoft Excel connections only. Data Interpreter isn't currently available for Excel files stored in cloud drives. For more information, see "Connect to Microsoft Excel data and clean with Data Interpreter" in the Connect to Data(Link opens in a new window) topic in the Tableau Prep help.
Troubleshoot OneDrive and SharePoint Online
Connections to multiple accounts
When using web authoring or publishing to the web, you can’t use multiple OneDrive accounts in the same workbook. You can have multiple account connections in Desktop.
Web authoring with Internet Explorer 11 and Edge
In Internet Explorer 11 and Edge, you can't access a server using an unsecured connection (http). Use a secure connection (https) or switch to another browser.
See also
- Set Up Data Sources – Add more data to this data source or prepare your data before you analyze it.
- Build Charts and Analyze Data – Begin your data analysis.
