在.net 3.5中使用ADAL [英] Using ADAL in .net 3.5

查看:90
本文介绍了在.net 3.5中使用ADAL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个AzureAD注册的Web API可以正常工作。我能够通过AcquireTokenAsync获取访问令牌。那里没有问题。但是,不需要将我的其余客户端库降级到.net 3.5。我无法在.net 3.5中使用ADAL。 AcquireTokenAsync返回3.5中不支持的任务。我在一些教程中已经读到,该方法(AcquireToken)此处。但我只是无法使用该方法。另外,当我尝试安装该特定版本的ADAL(2.19.208020213)时,我收到一个Nuget错误,提示.Net 3.5不支持任何版本。

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

我是什么

更新

我正在尝试找出哪个版本的ADAL面向.Net 3.5,因此我可以将其安装在我的项目中。

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

更新2

如果.Net 3.5中不支持ADAL,那么从.net 3.5中的Azure AD中获得授权令牌的选项有哪些?

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

推荐答案

该库仅支持4.5,因为该.net版本中添加了异步支持。您可能需要回溯到非常老的库版本才能使较旧的.net sdk正常工作。但是您将失去重要的重大修复和功能。

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.

这篇关于在.net 3.5中使用ADAL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆