Im trying to play with the Microsoft Power BI REST API but didn't get much far since im not very experienced with the API's
as i understand the Authentication Context is part of the Identity model active directory, which i triple check if it was referenced to the project (the rest of the methods run property)
but there are no methods called AcquireToken or AcquireTokenSilent, i just have other ones called AcquireTokenAsync ans AcquireTokenAsyncSilent idk if they are the some or not.
if someone can provide any light on the matter it will be much appreciated.
Thanks
You could be using V3 of ADAL.NET which appears to no longer have AcquireToken(). But it still has AcquireTokenAsync(). Note however that the parameters have slightly changed in the methods for v2 and v3.
ADAL.NET v3 has this AuthenticationContext
ADAL.NET v2 has this AuthenticationContext
I had the same issue. When you are using Microsoft.IdentityModel.Clients.ActiveDirectory you need to install the correct version. I tried with the latest version but did not work. But after installing Microsoft.IdentityModel.Clients.ActiveDirectory version 2.22.302111727 error was solved.
If you are using the latest version, AcquireToken was removed in v3 of the Microsoft.IdentityModel.Clients.ActiveDirectory library. You now have to use AcquireTokenAsync.
Reference - https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/issues/443
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With