问题描述
我正在尝试进行简单的身份验证,以获取用于从Visual Basic .NET控制台应用程序查询密钥保管库密钥的令牌,这是我到目前为止返回401错误长度所需的
I am trying to do a simple authentication to get a token to use in querying a key vault secret from a visual basic .NET console application, here is what I have so far which returns a 401 Error Length Required
URL中有多行可读性:
Multiple lines in URL for readability:
URL =" https://login.microsoftonline.com/< tenate guid> / oauth2 /令牌?
URL = "https://login.microsoftonline.com/<tenate guid>/oauth2/token?
client_id =< AD中已注册应用的指南>
client_id=<guid of registerd app in AD>
& resource =< url encoded> https://< myvault> .vault.azure.net:433 /
&resource=<url encoded>https://<myvault>.vault.azure.net:433/
& client_secret =< mySecret>
&client_secret=<mySecret>
request = System,Net.WebRequest.Create(URL)
request = System,Net.WebRequest.Create(URL)
request.Method =" POST"
request.Method = "POST"
response = request.GetResponce
response = request.GetResponce
我不想使用异步电话
Lee
推荐答案
这篇关于HTTP AD身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!