SCRT-HQ / PSGSuite

Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
https://psgsuite.io/
Apache License 2.0
235 stars 67 forks source link

[Feature Request] Set language for users #229

Closed visorsz closed 5 years ago

visorsz commented 5 years ago

Is your feature request related to a problem? Please describe. All newly created users get the default language in G-suite. The company I work for has users of different nationalities and it would be great to set a language when the user is created.

Describe the solution you'd like It would be great if I could set the language of a user when using New-GSUser and Update-GSuser.

Describe alternatives you've considered If a user is created in a certain Organisational Unit, then get language XYZ. However I don't think this would be easier than my above request.

Additional context The link below could be useful https://developers.google.com/gmail/api/v1/reference/users/settings/updateLanguage

scrthq commented 5 years ago

Hey @visorsz - The link provided is for the Gmail API, which can be implemented on it's own, but will likely not work as expected (for New-GSUser at least). This is because the Gmail API authenticates as the user you're targeting, not as the Super Admin account, and new users typically do not have Gmail activated yet until they've logged in once and accepted the Terms & Conditions.

I'll add in the Gmail Setting functions to manage that and see if I can get a wrapper in on New-GSUser/Update-GSUser, but your mileage may vary for actual use outside of scripting the follow-up command.

visorsz commented 5 years ago

Hi @scrthq - Thank you for considering my suggestion. Unfortunate that we can not use the Gmail API before the ToC is accepted. Gmail setting function would still be very nice to have tho!

scrthq commented 5 years ago

hey @visorsz - This is now available in v2.32.0 as Update-GSGmailLanguageSettings. Try it out and let me know! You can also get a user's current language settings with Get-GSGmailLanguageSettings.