Skip to content

server.favorites.add_favorite_workbook(user_item, workbook_item) returns resource conflict #1236

Closed

Description

@CodingOnWindowsOS

Describe the bug
server.favorites.add_favorite_workbook(user_item, workbook_item) returns resource conflict when multiple workbooks exist on a server with the same name, despite having different IDs. The workbooks have the same name but exist in different projects. A common example would be when a workbook or tableau server object (e.g., workbook, datasource, flow, etc.) exist in a production folder and also in a UAT/Test folder. A user may favorite both versions.

Versions
Details of your environment, including:

  • Tableau Server version: 2022.1
  • Python version: Python 3.9.12
  • TSC Version: 3.15

To Reproduce
import tableauserverclient as tsc

Setup

token_name = 'some_token_name'
token_value = 'some_token_value'
tableau_auth = tsc.PersonalAccessTokenAuth(token_name=token_name, personal_access_token=token_value)
server = tsc.Server('some_server')
server.add_http_options({'verify': False})

with server.auth.sign_in(tableau_auth):
server.use_highest_version()
from_user = server.users.get_by_id('some_user_id')
to_user = server.users.get_by_id('some_user_id')
server.users.populate_favorites(from_user)
server.users.populate_favorites(to_user)
from_user_favorites = from_user.favorites
for workbook in from_user_favorites['workbooks']:
server.favorites.add_favorite_workbook(to_user, workbook)

Results
What are the results or error messages received?
ServerResponseError:

409007: Resource Conflict
	A favorite already exists with the name 'some_name'

Activity

  1. jacalata commented on May 24, 2023

    @jacalata
    Contributor

    This looks like an internal error - I've asked the relevant team to look into it.

  2. jacalata commented on Feb 7, 2024

    @jacalata
    Contributor

    This will be fixed in an upcoming release.

  3. github-actions commented on Aug 2, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.

  4. jacalata commented on Aug 16, 2026

    @jacalata
    Contributor

    Closing -- fixed in Tableau Server 2025.0. The REST API no longer throws ResourceConflictException on addFavorite in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions