Microsoft Graph的问题。这会根据this documentation
创建新的ExtensionPropertiesfunction crear($objeto, $datos){
$graph->setApiVersion("beta");
$r = $graph->createRequest("POST", "/$objeto")
->attachBody($datos)
->execute();
}
crear('applications/'.ID_APP.'/extensionProperties', array(
'extensionProperty'=>array(
"appDisplayName"=>NOMBRE_APP,
"name"=>"cargo",
"dataType"=>"Integer",
"isSyncedFromOnPremises"=>true,
"targetObjects"=>array('Group')
)
));
错误:
Type: GuzzleHttp\Exception\ClientException
Message: Client error: `POST
https://graph.microsoft.com/beta/applications/my_id_app/extensionProperties` resulted in a `405 Method Not Allowed`
response: { "error": { "code": "Request_BadRequest", "message": "Specified
HTTP method is not allowed for the request (truncated...)
Filename: /var/www/html/ischooldesarrollo/application/libraries/msgraph-sdk-
php/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
Line Number: 111
我做错了什么?
答案 0 :(得分:1)
如果您尝试创建架构扩展定义,请遵循以下文档:https://developer.microsoft.com/en-us/graph/docs/concepts/extensibility_overview
您在此处的链接:https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/application_post_extensionproperties应从文档中删除。这暗示了创建Azure AD(图形)目录架构扩展(Microsoft Graph中的版本的前身)的能力。 Microsoft Graph支持不创建此类扩展定义。我将为此提交内部文档错误。
希望这有帮助,