microsoft / Microsoft-Fabric-workload-development-sample

Demonstrates how to implement a Microsoft Fabric workload in .net and typescript
Other
30 stars 16 forks source link

Error when acquiring access token #83

Closed q-benwillis closed 2 months ago

q-benwillis commented 2 months ago

I'm developing a new Fabric workload and am trying to acquire a new access token using the Auth Client API.

This is my code:

const token = await this.workloadClient.client.auth.acquireAccessToken(params).catch(err => {
  console.error("Failed to retrieve token", err);
});

where params is:

{
    "additionalScopesToConsent": [
        ".default"
    ],
    "claimsForConditionalAccessPolicy": null
}

Unfortunately this is failing and all I'm seeing in the logs is Failed to retrieve token {error: 0}. Is there any way I can get more information on why this is failing?

yonadiv commented 2 months ago

solved offline, it is transient: solved by adding the url parameter clientSideAuth=1 and then it stopped failing even without the parameter.