作为服务运行的EWS应用的OAuth身份验证 [英] OAuth authentication for EWS app running as service

查看:163
本文介绍了作为服务运行的EWS应用的OAuth身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

 我的EWS应用程序作为服务运行.我有一个模拟帐户,该帐户模拟了在O365上使用基本身份验证的所有用户,现在我打算提供OAuth身份验证.我一直在追问

 My EWS application runs as a service. I've impersonation account which impersonate all the users using Basic authentication on O365, now I'm planning to provide OAuth authentication. I've following questions

1.我的应用程序作为服务运行,我不想提示用户同意的网页.我该怎么办?

1. My application runs as service and I don't want to prompt a web page for user consent. How can I do this?

2.我已经在Azure中注册了我的应用程序,并且仅看到AppID/ClientID.如何获取ClientAppUri和Authority参数?

2. I have registered my app in Azure and I see only AppID/ClientID. How to get ClientAppUri and Authority parameters?

3.我在互联网上看到的示例代码也使用了"authenticationContext.AcquireToken".我没有在ADAL中看到AcquireToken.我看到AcquireTokenAsync的参数与AcquireToken不同.我需要使用哪个功能,不需要 提示网页给最终用户?

3. Also sample code that I'm seeing on the internet uses 'authenticationContext.AcquireToken'. I don't see AcquireToken in the ADAL. I see AcquireTokenAsync which doesn't take the same parameters as AcquireToken. Which function i need to use, which doesn't prompt a webpage to the end user?

我们非常感谢您的帮助

谢谢

Vinod


推荐答案

  • 请参阅 验证 使用OAuth 文档创建EWS应用程序,该文档将指导您设置EWS应用程序以使用OAuth.
  • ClientAppURI 权威 是用于验证最终用户并为您的应用返回令牌的令牌服务器访问EWS.  此处为"http://login.windows.net/<YourAccountName>.onmicrosoft.com"<
    1. Please refer to Authenticate an EWS application by using OAuth document which will guide through to setup you EWS application to use OAuth. 
    2. ClientAppURI will be the URI registered with Azure Active Directory.  This is the application client URI when your registered your application with Azure Active Directory.  Authority is the token server which authenticates the end user and return the token for your application to access EWS.  Here it will be "http://login.windows.net/<YourAccountName>.onmicrosoft.com"
    3. Please refer to the above link which provides you with the AcquireToken usage details along with the sample code.


    这篇关于作为服务运行的EWS应用的OAuth身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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