Bryan P
Bryan P

Reputation: 5051

UserManager.createUser() - permission error

UserManager.createUser() gives me the "You do not have permission to perform that action" error, but I'm already able to create new domain users under the same apps account (non-paid) manually as a super admin. Any reasons why running it through a script would throw this error?

Upvotes: 2

Views: 731

Answers (2)

Serge insas
Serge insas

Reputation: 46802

as a complement to Bryan's answer :

from the doc : Class UserManager

This class allows administrators to create, update, retrieve and delete users in a Google Apps domain. To use this class you have first to enable the Provisioning API on your domain. For a next-generation control panel, 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. If your control panel is not Next generation, enable the API by logging in to your admin account, and clicking the Users and groups tab. Then click the Settings subtab, select the checkbox to enable the Provisioning API and save your changes.

Upvotes: 0

Bryan P
Bryan P

Reputation: 5051

Google Apps Control Panel > Domain settings > User Settings > Select the checkbox enabling the Provisioning API > Save your changes. That needs to happen first.

Upvotes: 3

Related Questions