简体   繁体   English

从Enterprise G-Suite中的电子邮件地址获取名字和姓氏

[英]get first and last name from e-mail address in Enterprise G-Suite

I am trying to find a user's name from their e-mail address. 我正在尝试从他们的电子邮件地址中找到用户的名字。 I thought I could use People.People.get as mentioned here but that requires knowing the user's account ID. 我以为我可以使用People.People.get提到这里 ,但需要知道用户的帐户ID。

How can I get information about the user if I only know their e-mail? 如果我仅知道他们的电子邮件,如何获得有关该用户的信息?

And I don't think I can use the Directory API cause I don't have admin access. 而且我认为我无法使用Directory API,因为我没有管理员权限。

You can use Admin Directory API to get user's details. 您可以使用Admin Directory API来获取用户的详细信息。 While making the URL call, you need to specify a parameter in the request body which is (viewType:"domain_public"), so you will get the basic details of the user in your domain without having admin rights. 进行URL调用时,您需要在请求正文中指定一个参数(viewType:“ domain_public”),这样您将获得域中用户的基本详细信息,而无需管理员权限。

Reference Link : https://developers.google.com/admin-sdk/directory/v1/reference/users/get 参考链接: https : //developers.google.com/admin-sdk/directory/v1/reference/users/get

I don't think you can do it without Admin Rights, on the link you mentioned you need the AccountId which can only be retrieved by having Admin Rights and Access to the Directory API ( https://developers.google.com/admin-sdk/directory/v1/reference/users/get ) which you mentioned tyou don't have access to. 我认为如果没有管理员权限,您无法做到这一点,在您提到的链接上,您需要AccountId,该帐户只能通过具有管理员权限和对Directory API的访问权限( https://developers.google.com/admin- sdk / directory / v1 / reference / users / get ),其中提到您无权访问。

You could ask to your Administrator to get an Admin Role https://support.google.com/a/answer/172176?hl=en to use the Admin SDK for complete your task, it will be easier for you. 您可以要求管理员获得管理员角色https://support.google.com/a/answer/172176?hl=zh_CN,以使用Admin SDK来完成您的任务,这对您来说会更加容易。 The other way I don't know how the contact sharing is setup in your organization because you should be able to check the information of the contact when sending an email or adding it to your contact list. 另一种方式是,我不知道您的组织中如何设置联系人共享,因为在发送电子邮件或将其添加到联系人列表时,您应该能够查看联系人信息。

I hope this information can be of help. 希望这些信息对您有所帮助。 Greetings. 问候。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 G套件商务邮件发送配额 - G-suite business mail sending quota 在 G-Suite 插件中获取 CalendarEvent 的重复发生 - Get recurrence of CalendarEvent in G-Suite Addon 如何使用 G-Suite 开发人员中心创建带有“来自电子表格”事件源的独立 onEdit(e) 触发器? - How can I create a stand-alone onEdit(e) trigger with a 'from Spreadsheet' event source using G-Suite Developer Hub? 在 G-Suite Enterprise 的 Google Apps 脚本中显示 Google Picker,无需访问 GCP - Show Google Picker in a Google Apps Script in G-Suite Enterprise without access to GCP 仅当G列为Y时,发送电子邮件给L列的地址 - Send an e-mail for an address on column L only if column G is Y 检索 Google 表单回复者的电子邮件地址,而无需在表单中询问他们的电子邮件地址 - Retrieve the e-mail address of a Google Form respondent without asking for their e-mail address in the form 批量更新用户G-suite - Bulk Update users G-suite Google Apps批量更改主要电子邮件地址 - Google Apps change primary e-mail address in bulk 更改 Google Script 的源电子邮件通知地址 - Change source e-mail notification address for Google Script 在提交时将Google表单回复发送到指定的电子邮件地址 - Sending Google Forms responses to specified e-mail address on Submit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM