截至几天前,我无法使用 Graph REST API 创建带有密码的应用程序。端点返回 400 错误:必须使用服务操作生成新密码凭据
。 REST 调用是
POST https://graph.microsoft.com/beta/applications
{
"displayName": "appname",
"passwordCredentials": [
{
"customKeyIdentifier": "base64/UTF16-encoded-name",
"endDateTime": "2020-12-31T12:00:00Z",
"secretText": "some-secret-text"
}
]
}
这是使用具有委派 Directory.AccessAsUser.All、User.Read 和 openid 权限的应用程序。我是相关租户的管理员。
这是故意的吗?我怎样才能让它再次工作?
最佳答案
我可以重现您的问题,看起来 API 已更改,有一个新的 MS Graph API 来创建密码 - application: addPassword 。注意 Microsoft Graph 中 /beta
版本下的 API 可能会发生变化。
POST https://graph.microsoft.com/beta/applications/{object-id}/addPassword
{
"passwordCredential": {
"displayName": "Mypassword",
"endDateTime": "2020-12-31T12:00:00Z"
}
}
关于azure-active-directory - 无法使用 beta Graph API 创建密码 AAD 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58720221/