Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
Server-Side Enhancementneeds investigationIssue needs to be looked at by TableauIssue needs to be looked at by Tableaustale
Description
Describe the bug
Providing the owerName filter to an endpoint never returns any items.
Versions
Details of your environment, including:
- Tableau Server Version - 2020.3.8, 2021.3.0
- Python Version - 3.8.10
- Tableauserverclient version - 0.16.0
To Reproduce
EDIT: Edited the reproduction code to reflect more handling of commas and spaces. None of the combinations produced yield a result.
from itertools import product
import os
from dotenv import load_dotenv
import tableauserverclient as TSC
load_dotenv()
server = TSC.Server(os.environ["SERVER_ADDRESS"], True)
auth = ...
server.auth.sign_in(auth)
prefix_domain = lambda name, domain: f'{domain}\\{name}'
suffix_domain = lambda name, domain: f'{name}@{domain}'
just_name = lambda name, domain: name
# Comma treatments
remove_comma = lambda name: name.replace(',', '')
first_last = lambda name: ' '.join(name.split(', ')[::-1])
url_encode_comma = lambda name: name.replace(',', '%2C')
backslash_comma = lambda name: name.replace(',', '\\,')
backslash_url_escaped_comma = lambda name: name.replace(',', '\\%2C')
url_encode_escape_comma = lambda name: name.replace(',', '%5C%2C')
no_op = lambda name: name
# Space treatments
remove_space = lambda name: name.replace(' ', '')
url_encode_space = lambda name: name.replace(' ', '%20')
url_encode_escape_space = lambda name: name.replace(' ', '%5C%20')
url_encode_plus_space = lambda name: name.replace(' ', '+')
url_encode_plus_escape_space = lambda name: name.replace(' ', '%5C+')
user: TSC.UserItem = server.users.get_by_id(server.user_id)
email = user.email
username = user.name
domain = user.domain_name
formats = [prefix_domain, suffix_domain, just_name]
user_names = [user.fullname, email, username]
# control
commas = [no_op, remove_comma, first_last, url_encode_comma, backslash_comma, backslash_url_escaped_comma, url_encode_escape_comma]
# control
spaces = [no_op, remove_space, url_encode_space, url_encode_escape_space, url_encode_plus_space, url_encode_plus_escape_space]
# control
string_methods = [str.strip, str.capitalize, str.casefold, str.lower, str.title, str.upper]
endpoints = ['workbooks'] #, 'projects', 'datasources', 'flows', 'views']
for combo in product(formats, user_names, commas, spaces, string_methods, string_methods, endpoints):
# edit - Added check for case sensitivity on domain
func, name, comma, spaces, method, dom_method, endpoint = combo
name = comma(name)
name = method(name)
name = spaces(name)
dom = dom_method(domain)
name = func(name, dom)
reqopts = TSC.RequestOptions()
reqopts.filter.add(
TSC.Filter(
TSC.RequestOptions.Field.OwnerName,
TSC.RequestOptions.Operator.Equals,
name
)
)
endpoint = getattr(server, endpoint)
try:
items, _ = endpoint.get(reqopts)
except TSC.ServerResponseError:
continue
if len(items) > 0:
print(name)Results
No results are ever printed, yet at least some combination of that should work.
NOTE: Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.
Metadata
Metadata
Assignees
Labels
Server-Side Enhancementneeds investigationIssue needs to be looked at by TableauIssue needs to be looked at by Tableaustale
Activity
jorwoods commentedon Oct 2, 2021
I should add that for that site, I own multiples for projects, workbooks, data sources, views, and flows, so at least something should have returned.
jacalata commentedon Oct 26, 2021
So for the record, you are supposed to search by user.fullname, which shouldn't need any changing to use with tsc. I believe you aren't actually trying that as is in the code above, are you?
On my server that is a value looking like "First LastName", but from the first_last and last_first string handling you've got, I'm guessing it's not like that on your server?
a) does it work if you pass in user.fullname directly?
b) can you share an example of user.fullname from your server?
jorwoods commentedon Oct 26, 2021
On my server, it is "LastName, First". So mine would appear as "Woods, Jordan". When I try passing in
user.fullnamedirectly, I get backServerResponse Error: 400065: Bad Request. If I try changing it to theurllib.parse.quote_plusversion, or otherwise escaping the comma, it does not return results either.jorwoods commentedon Sep 4, 2024
Per the Filtering and Sorting docs:
Would it be possible to enable it server side such that commas and ampersands escaped similar to how salesforce does it will work?
E.G.
jacalata commentedon Jun 18, 2026
Per the Tableau REST API filtering docs: filter expressions can't contain
&or,characters, even URL-encoded. SinceownerNamevalues like"Woods, Jordan"contain a comma, they can't be used as filter values today.This is a server-side REST API limitation — TSC can't work around it. Relabelling as Server-Side Enhancement.
github-actions commentedon Aug 18, 2026
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.
github-actions commentedon Sep 2, 2026
Closing due to inactivity. If this is still relevant, please reopen or file a new issue.