Forum Discussion
How do I use Kusto client to create table?
kusto345 , The error does suggest that you are missing adal.
It may be because you are working on a different environment where adal is missing (virtualenv, conda, etc..) or that you have an old version installed.
Could you kindly paste the output of pip freeze, and try and import adal in python REPL?
- kusto345Mar 08, 2020Copper Contributor
Daniel Dubovski thanks for responding and the pointer, apologies that it took me so long to respond.
I cleaned up my env and recreated it. I seem to have made progress but still unable to use the client sdk to create a table
'message': 'Caller is not authorized to perform this action', '@type': 'Kusto.DataNode.Exceptions.UnauthorizedDatabaseAccessException', '@message': "Principal 'aadapp=<sp>;<tenant-id>' is not authorized to access database '<database-name>'."
So I turned to azure cli to grant the role of "AllDatabasesAdmin" to my service principal. I however do not see any of the roles for ADX. As a result when I try to grant my sp access to the database it just does not find the role. I picked a role from the portal, there are two "AllDatabasesAdmin" and "AllDatabasesViewer"
az role assignment create --assignee <sp> --scope <resource-path-to-database> --role AllDatabasesAdmin.
I get the following exception
Role 'AllDatabasesAdmin' doesn't exist.