ユーザーの部分更新のリクエスト時に出るuserExternalKey must be the same as the primary organization\'s externalKey.の対処法を教えてほしい。
■この話は
ユーザーの部分更新のリクエスト時に出る以下エラーについて
userExternalKey must be the same as the primary organization\'s externalKey.
■前提
userExternalKeyは使っていない。
tokenは間違ってない。
■結論
なぜこのエラーになるのかわかる方いらっしゃれば教えてほしいです。
function update_user_org(){
let token = getToken();//トークンを取得する関数
let response;
let userId = "example@example.co.jp";
let headers = {
"Authorization": "Bearer " + token,
"Content-Type": "application/json",
};
let payload = {
"organizations": [
{
"domainId": 10000001,
"primary": true,
"orgUnits": [
{
"orgUnitId": "orgUnitIdを入れる",
"primary": true,
}
]
}
],
}
let options =
{
"method" : "patch",
"headers" : headers,
"payload" : JSON.stringify(payload),
};
response = UrlFetchApp.fetch("https://www.worksapis.com/v1.0/users/"+ userId, options);
console.log(JSON.parse(response));
return JSON.parse(response);
}
投稿に新しいコメントが追加されましたら通知を送信します。
コメント0
まだ、解決できませんか?
今すぐ実際に使用しているLINE WORKSユーザーに質問してみましょう。