Either one of the services you are attempting to access is disabled, the script user does not have privileges to access the API, or the admin account you are using has not been logged in manually to accept the terms of service agreement.
Google Admin SDK must be enabled on your domain before you can use it.
From the Enabling advanced services:
To use an advanced Google service, follow these instructions:
In the script editor, select Resources > Advanced Google services....
In the Advanced Google Service dialog that appears, click the on/off switch next to the service you want to use.
Click OK in the dialog.
Make sure your service account has domain wide authority:
Go to your G Suite domain’s Admin console.
Select Security from the list of controls. If you don't see Security listed, select More controls from the gray bar at the bottom of the page, then select Security from the list of controls.
Select Advanced settings from the list of options.
Select Manage API client access in the Authentication section.
In the Client name field, enter the client ID obtained from the service account >creation steps above.
In the One or More API Scopes field enter the scopes required for your application (for a list of possible scopes, see Authorize requests).
Click the Authorize button.
You must log into the system using the credentials in a web browser to accept the terms of service before an account can be used to administer the domain.
Following these three items should resolve your issue.