Azure数字孪生身份验证-InteractiveBrowser凭据身份验证失败 [英] Azure Digital Twin Authentication - InteractiveBrowserCredential Authentication Failed

查看:76
本文介绍了Azure数字孪生身份验证-InteractiveBrowser凭据身份验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试从 Azure-Samples/digital-twins-samples .这段代码在这里失败 client.GetDigitalTwin("---");

Trying to run the sample from Azure-Samples/digital-twins-samples. It is failing here in this code client.GetDigitalTwin("---");

我已经在身份验证窗口中输入了所需的凭据,并且出现了一个异常消息"InteractiveBrowserCredential Authentication Failed".

I have entered the required credentials in the authentication window and it gives an exception saying "InteractiveBrowserCredential Authentication Failed".

内部异常-仅支持环回重定向uri,但是找到了urn:iet:wg:oauth:2.0:oob."在应用程序注册期间和创建PublicClientApplication对象时,都配置http://localhost或http://localhost:port.有关详细信息,请参见 https://aka.ms/msal-net-os-browser

Inner Exception - "Only loopback redirect uri is supported, but urn:iet:wg:oauth:2.0:oob was found." Configure http://localhost or http://localhost:port both during app registration and when you create the PublicClientApplication object. See https://aka.ms/msal-net-os-browser for details

我已经验证了角色"Azure Digital Twins Owner(Preview)"是否已代表我的用户ID,并且我可以查看/更新模型&此示例中的数字资源管理器示例中的双胞胎

I have verified whether the role "Azure Digital Twins Owner (Preview)" is present for my user id and I am able to view/update the models & twins in the digital explorer sample from this example ADT explorer, but unable to update model through code. I believe there is some configuration missing in the reply url of the desktop/web url.

任何想法如何解决此问题.

Any idea how to fix this issue.

推荐答案

直接讨论此问题后,我们发现客户端计算机上的Internet Explorer导致/遇到了一些弹出窗口阻止.

After discussing directly on this issue, we observed that the Internet Explorer on Client Machine is causing/experiencing some blocking on pop-ups.

解决方案1:

  • 请检查浏览器是否启用了弹出窗口阻止程序.
  • 请将默认浏览器更改为其他浏览器(例如chrome)然后重试.
  • 清除浏览器缓存并关闭所有打开的浏览器会话.
  • 重新启动VS2019并尝试运行示例代码.

解决方案2:

  • 确保您使用的是 Azure.Identity 最新的NuGet软件包.截至今天(2020年2月9日),工作版本为Azure.Identity 1.2.2
  • Make sure you are using Azure.Identity latest NuGet Package. As of today 09/02/2020 the working version is Azure.Identity 1.2.2

解决方案3:

请确保AAD应用程序身份验证具有移动设备和添加了桌面应用程序的平台,以及重定向URL.有关更多信息,请访问以下 Github问题:

Please make sure the AAD Application Authentication has a 'Mobile & Desktop Application' Platform added, along with the redirect URL. For more information please visit this Github issue:

这篇关于Azure数字孪生身份验证-InteractiveBrowser凭据身份验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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