本文介绍了目录API,用户组织-名称字段.它从何而来?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Directory API https://developers.google. com/admin-sdk/directory/v1/reference/users/get 返回用户的以下组织数据类型.但是,在Apps Admin控制台中,我找不到定义相应组织名称公司标题"的位置.它来自何处或如何编辑该数据?这也是不一致的,因为对于同一域中的某些用户,名称"字段完全丢失了?

The Google Directory API https://developers.google.com/admin-sdk/directory/v1/reference/users/getreturns following kind of organizations data for a User. However in the Apps Admin console I can not find where the corresponding organisations name "Company Title" is defined. From where does it come from or how to edit that data? This is also inconsistent, since for some Users in this same domain the "name" field is missing completely?

"organizations": [
 {
   "name": "Company Title",
   "title": "Software Developer",
   "primary": true,
   "type": "work",
   "department": "The SW department"
 }
],

推荐答案

我对Apps Admin控制台并不特别,但是如果需要更改数据,则可以更新用户帐户.

I'm not particular about the Apps Admin console but you can update a user account if there are data that has to be changed.

PUT https://www.googleapis.com/admin/directory/v1/users/userKey

您可以尝试使用REST API来检索所有或子级组织单位.

You can try the REST API to retrieve all or children organization units.

GET https://www.googleapis.com/admin/directory/v1/customer/my_customer
/orgunits?orgUnitPath=full org unit path&type=all or children

以下是对单位单位列表的响应示例

Here is a sample response to the List of Org unit/s

{
    "kind": "directory#orgUnit",
    "name": "sales",
    "description": "The corporate sales team",
    "orgUnitPath": "/corp/sales",
    "parentOrgUnitPath": "/corp",
    "blockInheritance": false
     }

您也可以尝试使用更新组织单位":

You can also try using the Update an organization unit:

PUT https://www.googleapis.com/admin/directory/v1/customer/customerId/orgunits/orgUnitPath

您可以在REST API和管理控制台中比较这些值.

You can compare the values in the REST API and Admin Console.

希望有帮助!

这篇关于目录API,用户组织-名称字段.它从何而来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 06:45