【问题标题】:Microsoft Graph API - Application is not supported for this API versionMicrosoft Graph API - 此 API 版本不支持应用程序
【发布时间】:2017-09-10 14:03:35
【问题描述】:

我正在尝试使这个 Graph API 示例工作: https://github.com/microsoftgraph/xamarin-csharp-snippets-sample

我在 Azure 中注册了我的应用程序,获取了 Application-id 并将其设置到示例中的 App.cs 文件中。 每次我尝试简单的操作时,都会收到以下消息:

Users.Get Me 失败。例外:AADSTS70001:应用程序“我的应用程序 ID” 此 API 版本不支持。

我尝试修改 AuthenticationHelper.cs 文件以从新开始

GraphServiceClient("https://graph.microsoft.com/v1.0",

到:

new GraphServiceClient("https://graph.microsoft.com/v1.6",

尝试获取 1.6 API 版本,希望问题来自那里。 但我仍然一遍又一遍地收到相同的信息。

我选择了这个示例,因为我所要做的就是设置 App ID(我是这么认为的),但我无法让它工作。

有人遇到过这个问题吗? 我应该改变什么才能让它工作,以便我可以在我的“真实”解决方案中使用图形 API。

谢谢。

【问题讨论】:

  • 您能否提供导致此异常的实际代码?
  • 我遇到了类似的问题,尝试按照developer.microsoft.com/enus/graph/docs/concepts/… 提供的文档注册应用程序,并替换示例中的客户端 ID,它可以正常工作。希望这会有所帮助!

标签: c# azure authentication xamarin.forms microsoft-graph-api


【解决方案1】:

Graph 只有两个版本https://graph.microsoft.com/v1.0https://graph.microsoft.com/beta。我不确定你从哪里得到https://graph.microsoft.com/v1.6,但这不是一个有效的图表URI。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-02-25
    • 2018-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多