【发布时间】:2021-08-04 22:35:26
【问题描述】:
我没有从以下链接中看到我的 posixAccounts 信息: https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/get
{
"kind": "admin#directory#user",
"id": "8675309",
"etag": "\"UUID\"",
"primaryEmail": "email@example.com",
"name": {
"givenName": "Email",
"familyName": "Account",
"fullName": "Email Account"
},
"isAdmin": true,
"isDelegatedAdmin": false,
"lastLoginTime": "2021-08-04T21:11:17.000Z",
"creationTime": "2021-06-16T14:32:35.000Z",
"agreedToTerms": true,
"suspended": false,
"archived": false,
"changePasswordAtNextLogin": false,
"ipWhitelisted": false,
"emails": [
{
"address": "email@example.com",
"primary": true
},
{
"address": "email@example.com.test-google-a.com"
}
],
"phones": [
{
"value": "123-456-7890",
"type": "work"
}
],
"nonEditableAliases": [
"email@example.com.test-google-a.com"
],
"customerId": "id12345",
"orgUnitPath": "/path/to/org",
"isMailboxSetup": true,
"isEnrolledIn2Sv": false,
"isEnforcedIn2Sv": false,
"includeInGlobalAddressList": true
}
从上面的输出中可以看出,没有 posixAccount 信息。我可以在 Apache Directory studio 中打开 ldap 信息,所以我知道它在那里,但是从上面的输出中我看不到它。因为我可以看到它,所以我尝试使用 API 中的更新函数来更新它。
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/update
我将它用于有效负载,因为我只是在测试更新 gid 信息。我使用下面的文档来获取所需的条目详细信息。至少据我所知。
{
"posixAccounts": [
{
"gid": "12345",
}
]
}
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users
我收到 200 响应,但在执行 PUT 更新时,用户实际上并没有发生任何变化。
我在这里尝试了另一个用户的类似更新方法,但没有成功:Google Admin SDK - Create posix attributes on existing user
【问题讨论】:
-
您能否在您的问题中添加一些复制步骤?如果不确切知道自己在做什么或如何设置,就很难知道哪里出了问题。
-
明白。我已经更新了更多细节。感谢您的反馈。
标签: google-admin-sdk