我在通过 scim 和 javascript 在 WorkPlace 中创建用户时遇到问题。这是我的代码:
var url2 = "https://www.facebook.com/company/xxxxxxxxxxx/scim/Users/";
var options2 = {
'method' : 'POST',
'headers': headers,
'Accept': 'application/json',
'Content-Type': 'application/json',
//body: JSON.stringify(userJson),
'muteHttpExceptions' : true,
//body: userJson
'body': JSON.stringify({"userName":"xxx.xxx@xxxxxx-group.com","name":{"familyName":"Jensen","givenName":"Barbara"},"active":true,"schemas":["urn:scim:schemas:core:1.0"]})
};
var response2 = UrlFetchApp.fetch(url2,options2);
但是这段代码返回一个错误:
[17-04-26 07:55:39:939 PDT] {
"Errors": [
{
"description": "[field:schemas]Invalid Request: Your request can't be parsed or has incorrect syntax.",
"code": 1789003
}
]
}
关于解决方案的任何想法?感谢 JPA