Using ADAL in .net 3.5

自闭症网瘾萝莉.ら 提交于 2019-12-25 06:29:55

问题


I have an AzureAD registered Web API working correctly. I am able to acquire the access token by means of AcquireTokenAsync. No problems there. However, no I need to downgrade my rest client library to .net 3.5. I am not being able to use ADAL in .net 3.5. AcquireTokenAsync returns a Task, which is not supported in 3.5. I have read in some tutorials that there is a non async verstion of the method (AcquireToken) here. But I just can't access that method. Also, when I try to install that specific version of ADAL(2.19.208020213) I get a Nuget error saying there is no version supported to .Net 3.5

What am I doing wrong?

UPDATE

I am trying to find out which version of ADAL targets .Net 3.5 so I can install it in my project.

UPDATE 2

If ADAL is not supported in .Net 3.5, what are my options to obtain authorization token from Azure AD in .net 3.5?


回答1:


The library only supports 4.5 because async support was added in that .net release. You may need to dig back to very old versions of the library to get older .net sdk to work. But you would lose significant big fixes and features.



来源:https://stackoverflow.com/questions/38576618/using-adal-in-net-3-5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!