小编Fah*_*tar的帖子

代码:BadRequest 消息:/me 请求仅在委托身份验证流程中有效

我正在尝试使用microsoft graph onedrive api在 onedrive 上上传文件。我正在使用身份验证客户端凭据提供程序的方法

https://learn.microsoft.com/en-us/graph/sdks/choose-authentication-providers?tabs=CS#client-credentials-provider

喜欢:

// /.default scope, and preconfigure your permissions on the
// app registration in Azure. An administrator must grant consent
// to those permissions beforehand.
var scopes = new[] { "https://graph.microsoft.com/.default" };

// Multi-tenant apps can use "common",
// single-tenant apps must use the tenant ID from the Azure portal
var tenantId = "my-tenantid";

// Values from app registration
var clientId = "YOUR_CLIENT_ID";
var clientSecret = "YOUR_CLIENT_SECRET";

// using …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-mvc onedrive microsoft-graph-api

13
推荐指数
1
解决办法
3万
查看次数

标签 统计

asp.net-mvc ×1

c# ×1

microsoft-graph-api ×1

onedrive ×1