Azure Digital Twin Authentication - InteractiveBrowserCredential Authentication Failed

三世轮回 提交于 2021-01-28 03:38:47

问题


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

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

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

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.


回答1:


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

Resolution 1:

  • Please check if there are any pop-up blockers enabled on the browser.
  • Please change the default browser to another browser [like chrome] and re-try.
  • Clear the browser cache and close all opened browser sessions.
  • Restart VS2019 and try to run the sample code.

Resolution 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

Resolution 3:

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:



来源:https://stackoverflow.com/questions/63295518/azure-digital-twin-authentication-interactivebrowsercredential-authentication

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