2016-12-31 35 views
-2

我有一个Windows服务,我正在使用它对Azure AD进行身份验证。在winform应用程序中,Azure身份验证弹出窗口在服务中即将到来。Windows服务不允许显示Azure身份验证弹出窗口

Azure的身份验证弹出窗口的意思是说这个 enter image description here

帮助我。

+0

你可能会[必须]重新设计你的系统(http://stackoverflow.com/questions/53232/how-can-i-run-a-windows-gui-application-on-as-a-service)要么是一个标准的GUI应用程序,要么以内存方式存储凭据(而不是最好的想法),或者尝试http://stackoverflow.com/questions/267838/how-can-a-windows-service-execute- a-gui-application(不确定它会完全帮助这个对话框)。 –

+0

此外,可能有相关的讨论http://stackoverflow.com/questions/31882583/how-to-authenticate-a-windows-service-with-azure-ad-to-upload-events-to-office-3 –

+0

由于Windows Service在后台运行并且不需要用户干预,因此更好的方法是使用“服务主体”来处理Azure AD/Azure ARM API相关事宜。 –

回答

0

根据我的经验,这是从交互式桌面隔离的服务。我们无法从服务中显示UI。 我们可以创建服务主要门户,请参阅document。然后,我们可以通过Azure AD App客户端Id,secret,tenant Id获取Azure标记或凭据。更多详情请参考SO Thread