使用Microsoft Graph API时错误的重定向URL地址 [英] Incorrect redirect URL address while working with Microsoft Graph API

查看:50
本文介绍了使用Microsoft Graph API时错误的重定向URL地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究用于实现电子邮件功能的Microsoft graph API.

I am working on Microsoft graph API for implementing the Email functionality.

  • The source code is referred from the official microsoftgraph github account.
  • I am following the step mentioned here
  • On this Step I supposed to get a code in redirect URL address.

我想按照下面的步骤获得下面的网址.

I suppose to get below url as mentioned in the steps.

https://login.microsoftonline.com/common/oauth2/nativeclient?code={IAQABAAIAAABHh4kmS_aKT5XrjzxRAtHz5S...p7OoAFPmGPqIq-1_bMCAA}&session_state=dd64ce71-4424-494b-8818-be9a99ca0798

相反,我得到的是网址以下

instead of that I am getting below url

https://login.microsoftonline.com/a1f1e214-xxxx-xxxx-xxxxxx-xxxxxxxx59641/oauth2/v2.0/authorize?response_type=code&client_id=xxxxxxx-1xxxx-xxxx-ad2a-d80d3f51638a&redirect_uri=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fnativeclient&scope=Files.ReadWrite%20openid%20User.Read%20Mail.Send%20Mail.ReadWrite

注意:在 这是因为我没有选中在步骤4中提到的oauth2/nativeclient旁边的复选框第8点.

Is this because I dont have check the box checked next to oauth2/nativeclient which is mention at Step 4 Point 8 in the documentation.

任何指导都会有很大帮助

Any guidance will be great help

推荐答案

命令行界面在Azure Active上打开浏览器窗口 目录授权端点.输入您的用户名和密码以 认证.通过身份验证后,您将被带到 示例应用程序的授权窗口.审查并接受范围 示例应用程序请求.单击授权上的确定"按钮 窗口.

The command line interface opens a browser window on the Azure Active Directory authorization endpoint. Enter your user name and password to authenticate. When you are authenticated, you're taken to an authorization window for the sample app. Review and accept the scopes requested by the sample app. Click the Ok button on the authorization window.

当您获得该URL时,应要求您登录.之后,您将获得代码.

When you got that url, you should be asked to login. After that, you will get the code.

步骤:

在Azure门户上注册一个应用程序->获取客户端ID->转到Constants.java类,然后将client_id替换为您的

Register an app on Azure portal->get the client id-> go to Constants.java class and replace the client_id with yours.

运行PublicClient类.

Run the PublicClient class.

使用您的帐户登录,然后您将得到验证码.

Login in with your account, then you will get the code.

这篇关于使用Microsoft Graph API时错误的重定向URL地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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