我正在尝试使用Microsoft Graph API来管理我的aad应用程序(在B2C租户中,我可以创建和获取应用程序,但是无法更新任何现有的应用程序。
请求网址:https://graph.microsoft.com/beta/applications/ {appId}
请求正文:
{
"displayName":"abcd",
"api":{
"requestedAccessTokenVersion":2,
"oauth2PermissionScopes": [{
"adminConsentDescription":"write",
"adminConsentDisplayName":"write",
"userConsentDescription":"write",
"userConsentDisplayName":"write",
"type":"User",
"value":"write",
"isEnabled":true
}]
}
}
错误:
"code": "ValueRequired",
"message": "Property value is required but is empty or missing.",
我从here检查了api模式,它应该可以工作。不知道我缺少哪个属性。请帮忙。
最有可能是由于您的oauth2PermissionsScopes部分。看起来不对。尝试删除该部分,然后查看它是否有效。这将有助于获得完整的错误消息,包括请求ID和时间戳记