Need a special offer?Find out if your project fits.
+

Azure Analysis Services token error

Answered
Marco asked on March 3, 2021

Hi
i'm using this github project GitHub - flexmonster/pivot-accelerator-dll: A sample server with Flexmonster Accelerator as a DLL but I've this error:
The 'AuthenticationContext.AcquireToken(String, String, Uri, PromptBehavior)' method is missing from the embedded ADAL assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=5.2.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
 

4 answers

Public
Vera Didenko Vera Didenko Flexmonster March 4, 2021

Hello, Marco,
 
Thank you for reaching out to us.
 
Our team has investigated the error and found the following information: https://stackoverflow.com/questions/51200031/the-method-not-found-acquiretokensystem-string-microsoft-identitymodel-client.
 
The answer in this StackOverflow thread claims that the reason for the error is that the PnP code is calling AuthenticationContext.AcquireToken method, which belongs to the NuGet v2 version of Microsoft.IdentityModel.Clients.ActiveDirectory package. While the correct method of the v3 package to use is AcquireTokenAsync of the v3 version.
In the Accelerator implementation, the AcquireTokenAsync is used, so we assume this causes the conflict.
 
Considering the above, could you please check if there are no conflicts between the PnP's version of ActiveDirectory and the one you are using in your project? 
Please note that Flexmonster Accelerator depends on the "5.1.0" version.
 
Looking forward to your response. 
 
Kind regards,
Vera

Public
Marco March 4, 2021

Hi 
thanks for your answer
I rollback to Microsoft.IdentityModel.Clients.ActiveDirectory version 5.1.
Now i have two kind of errors
This one if I don't set user and password in my FlexmonsterProxyController.ConnectionString
1)Authentication failed: User ID and Password are required when user interface is not available.
This one if I set user and password in my FlexmonsterProxyController.ConnectionString
2) Unable to obtain authentication token using the credentials provided. If your Active Directory tenant administrator has configured Multi-Factor Authentication or if your account is a Microsoft Account, please remove the user name and password from the connection string, and then retry. You should then be prompted to enter your credentials.
 
How can I find a working example of flexmonster "Referencing the Accelerator as a DLL" connected to Azure Analysis Services? 

Public
Marco March 4, 2021

Hi
i was able to connect it to Azure Analysis Services
thanks for your support
bye

Public
Vera Didenko Vera Didenko Flexmonster March 4, 2021

Hello, Marco, 
 
Thank you for the update. 
 
Our team is happy to hear that you managed to successfully set up the connection to Azure Analysis Services. 
 
Should any questions arise, please feel free to reach out. 
 
Kind regards, 
Vera

Please login or Register to Submit Answer