Tableau Embedded views can result in the following error:
Access to fetch at 'https://pod.online.tableau.com/vizportal/api/web/v1/auth/embed/signin' from origin 'URL' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Configure Allowed Domains in Tableau Cloud:
Log in to your Tableau Cloud site as a site administrator.
Navigate to Settings (usually in the left pane).
Look for a section called Connected Apps. Within the connected app settings, you'll find an option for Domain allowlist.
Add the exact URL(s) of the website(s) where you are embedding the Tableau visualization to this allowlist. Ensure you include the protocol (e.g., https://) and the full domain name (e.g., https://www.yourwebsite.com). This tells Tableau Cloud to allow content to be embedded on these specific domains.
Different versions of code on the Tableau Cloud pod where a site is hosted and the version of the Embedding API library available at the embedding URL used for the source may result in the CORS error being returned.
In this case, update the Embedding API library URL in the website/application to include the pod where the Tableau Cloud site is hosted.
For example, instead of using:
<script type="module" src="https://online.tableau.com/javascripts/api/tableau.embedding.3.latest.min.js"></script>
use:
<script type="module" src="https://10az.online.tableau.com/javascripts/api/tableau.embedding.3.latest.min.js"></script>
Your pod is shown in the first portion of the site URL after signing in.
Example: https://10az.online.tableau.com is the United States - West (10AZ) pod.
Tableau Site Settings for Embedding
Configure Connected Apps with Direct Trust
001498319

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.