Google Script How do I getGivenName() of getActiveUser()

前端 未结 5 2126
刺人心
刺人心 2021-01-03 02:42

Each user on the domain initiates a simple script we run for leave entitlements but we want the welcome message to be \"Hi First Name,\" however the script doesn\'t seem to

5条回答
  •  自闭症患者
    2021-01-03 02:52

    You can get a user name but first you have to create a domain user using the provisioning api. You can enable the API by logging in to your admin account, and select Domain settings and the User settings tab to select the checkbox enabling the Provisioning API. Read more about it here

    You can then use

       user = user.getgivenName()
    

提交回复
热议问题