microsoft / delta-kusto

Engine able to compute delta between ADX clusters (and/or Kusto scripts) and generate update scripts
MIT License
47 stars 20 forks source link

Permission Issue on Kusto DB in Fabric #155

Closed alxdean closed 1 year ago

alxdean commented 1 year ago

Would be great if this would also work in Fabric. I added the service principal (after updating tenant settings) to the workspace with both Member and Admin but still get following error back:

Error: Issue in running job 'download-dev' Error: Issue running Kusto script '.show database schema as csl script' on cluster '<>' / database '<>' Exception encountered: Kusto.Data.Exceptions.KustoRequestDeniedException ; Forbidden (403-Forbidden): { "error": { "code": "Forbidden", "message": "Caller is not authorized to perform this action", "@type": "Kusto.Data.Exceptions.KustoRequestDeniedException", "@message": "Forbidden (403-Forbidden): {\r\n \"error\": {\r\n \"code\": \"Forbidden\",\r\n \"message\": \"Caller is not authorized to perform this action\",\r\n \"@type\": \"Kusto.DataNode.Exceptions.UnauthorizedDatabaseAccessException\",\r\n \"@message\": \"Principal '<>' is not authorized to read database '<>'.\",\r\n
... \"activityType\": \"DN.FE.ExecuteControlCommand\",\r\n
...

Any thoughts? too hard to get it working in fabric?

alxdean commented 1 year ago

solved it myself. I added the service pricipal via a kql directly to the database :-) .add database {dbname} users ('aadapp={clientid};{tenantid}') '{friendlyname}'