I am writing code to connect to power bi via TOM (Tabular Object Model) as opposed to the Rest API. Apparently the same authentication token can be used for both the REST API as well as TOM connectivity. As per here https://learn.microsoft.com/en-us/analysis-services/tom/introduction-to-the-tabular-object-model-tom-in-analysis-services-amo?view=asallproducts-allversions
In a deployed environment that uses managed identity the token works successfully for both, however in my local dev environment it fails on the Server.Connect to TOM (as per below) with an Unauthorized error.
The TokenService is just using the DefaultAzureCredential which makes use of the Azure CLI credential available once the dev does an "az login". Once again this works seamlessly for the REST API but fails against the XMLA endpoint on Server.Connect.
Wondering if anyone else has managed to get this to work? We do not want to use application based authentication as that significantly complicates things.
Thanks