#Data permissions

1 messages · Page 1 of 1 (latest)

compact stratus
#

I'm getting the error:

table.tsx:38 ❌ Error fetching tabular data: ConnectError: [permission_denied] requestID=701d9cc9dbfa7a81da48df8efaa47b93: permissions check failed for SQL query: You do not have access to perform 'read_organization_data_management' on organization '72032606-5cdb-4db6-9bc2-08b15cd49636': errPermissionDenied
at async fetchData (table.tsx:29:22)

I added more explanations and screenshots in the attachments.

warm grove
#

Opps same bug issue please help 😭 me
@compact stratus

young iron
#

@compact stratus are you sure the API key you are using has the correct permissions? From the screenshot it appears that it may only have permissions for a single machine (perhaps a “Try Viam” session machine based on the name)?

compact stratus
#

Ok, I tried creating a new key

#

const data = await dataClient.tabularDataBySQL(
'[key]',
'SELECT * FROM readings LIMIT 5'
);

I tried using both the ID that starts with f and the key that starts with o, and both times I get something like:

table.tsx:46 Failed to get data: ConnectError: [invalid_argument] requestID=912017cecbb4e55b51445c3b0971ca5e: Invalid organization ID
at Wi (main.es.js:3877:21)
at Ti (main.es.js:4945:20)
at next (main.es.js:5018:230)
at async Object.unary (main.es.js:4997:75)
at async Object.tabularDataBySQL (main.es.js:3706:15)
at async QR.tabularDataBySQL (main.es.js:22514:13)
at async getData (table.tsx:39:24)

cinder path
#

The first argument to that method should be your organization ID. The API key and API key ID are used as credentials when calling createViamClient.

compact stratus
#

Ok, now it's all clear to me. Why do I have to submit my organization id every time I make a query? Is that because keys can cross organizational boundaries?

#

BTW, I can retrieve data now!