'You are not authorized to access this API' when setting a vacation message for a user

61 views
Skip to first unread message

Mike Basso Super Admin

unread,
Apr 26, 2017, 5:08:11 AM4/26/17
to GAM for G Suite
I have used GADS to pull user accounts from groups.  Today I tried to set a vacation message for a user using the command:

gam user jsmith vacation on subject "Auto-Reply-Out of Office" message "To Whom it May Concern, John Smith is currently on leave. Please direct any messages that require an action to Jane Doe, jd...@domain.com. Dr. John Doe - Principal\n\n" startdate 2017-04-26 enddate 2017-04-26

and i get this response:

ERROR: 600 - Unknown Error: {'status': 403, 'body': '<HTML>\n<HEAD>\n<TITLE>You are not authorized to access this API</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>You are not authorized to access this API</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n', 'reason': 'You are not authorized to access this API'}

✉ Kevin Melillo

unread,
Apr 26, 2017, 8:13:08 AM4/26/17
to google-ap...@googlegroups.com
Can you try using the full email address like the following:

gam user jsm...@domain.com vacation on subject "Auto-Reply-Out of Office" message "To Whom it May Concern, John Smith is currently on leave. Please direct any messages that require an action to Jane Doe, jd...@domain.com. Dr. John Doe - Principal\n\n" startdate 2017-04-26 enddate 2017-04-26



--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/9da30e97-a15c-4101-af70-3433b725baa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Kevin Melillo
Electronic Communications Analyst
Information Technology
445 Hoes Lane
Piscataway, NJ 08854

Phone:732-465-6609 | Mobile: 732-609-4331

Mike Basso Super Admin

unread,
Apr 26, 2017, 8:45:48 AM4/26/17
to GAM for G Suite
It is working now.  It may have been because I was logged into google admin in 2 sessions.  one with my regular admin account and the other with my super admin account.  
I uograded GADS to 4.2 and in doing so I authenticated with my super admin account.  When finished upgrading the command works (although I had the same start and end date...but that wasn't why it originally failed)
Reply all
Reply to author
Forward
0 new messages