Wiping a User's Primary Calendar - 403 Forbidden

851 views
Skip to first unread message

JuanH

unread,
Jul 19, 2012, 8:42:26 AM7/19/12
to google-ap...@googlegroups.com
When I try to use the calender wipe command (gam calendar <user email> wipe), it fails with the 403 Forbidden error. 

More info:
  • All API's enabled.
  • Using full email address, not just username. 
Any idea why?

Jay Lee

unread,
Jul 19, 2012, 8:49:05 AM7/19/12
to google-ap...@googlegroups.com
Hi Juan,

  Sorry, I forgot to include in the document that you'll need to recreate the OAuth authorization using GAM 2.51 for calendar wipe to work since it requires an additional scope be added. You should be able to just do:

gam oauth revoke

to destroy the old OAuth token (as long as no one else is using it!) and then re-run the command and authorize GAM again.

I'll add that to the wipe docs now.

Regards,

Jay Lee
LCS Deployment Lead   |  ⚡ Dito



--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to
google-ap...@googlegroups.com
To unsubscribe from this group, send email to
google-apps-man...@googlegroups.com
For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager

JuanH

unread,
Jul 19, 2012, 9:04:15 AM7/19/12
to google-ap...@googlegroups.com
Thanks for the quick reply, Jay.

I might just be making a stupid mistake somewhere, but I did try that, both by running the 'gam oauth revoke' command and recreating, and actually deleting the oauth file and again recreating.

When I'm recreating and prompted to select API's, I select "13) Select all scopes". I'm then prompted to log in and do so with a super admin account.

Anywhere you can see that I'm messing up?



On Thursday, 19 July 2012 14:49:05 UTC+2, Jay Lee wrote:
Hi Juan,

  Sorry, I forgot to include in the document that you'll need to recreate the OAuth authorization using GAM 2.51 for calendar wipe to work since it requires an additional scope be added. You should be able to just do:

gam oauth revoke

to destroy the old OAuth token (as long as no one else is using it!) and then re-run the command and authorize GAM again.

I'll add that to the wipe docs now.

Regards,

Jay Lee
LCS Deployment Lead   |  ⚡ Dito



On Thu, Jul 19, 2012 at 8:42 AM, JuanH <jhay...@groveis.com> wrote:
When I try to use the calender wipe command (gam calendar <user email> wipe), it fails with the 403 Forbidden error. 

More info:
  • All API's enabled.
  • Using full email address, not just username. 
Any idea why?

--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to

To unsubscribe from this group, send email to

Jay Lee

unread,
Jul 19, 2012, 9:09:51 AM7/19/12
to google-ap...@googlegroups.com
All scopes are selected (have a * next to them) by default so you don't need to select them. What does:

gam oauth info

show? It should show various URLs (OAuth scopes) including at least 2 with calendar in them.


Regards,

Jay Lee
LCS Deployment Lead   |  ⚡ Dito




To unsubscribe from this group, send email to

JuanH

unread,
Jul 19, 2012, 9:12:59 AM7/19/12
to google-ap...@googlegroups.com

Jay Lee

unread,
Jul 19, 2012, 9:15:25 AM7/19/12
to google-ap...@googlegroups.com
That has the correct scopes to perform a wipe. Is the Google Apps Admin user listed there a super admin? Are you sure the calendar you're trying to wipe is in the same Google Apps instance? Is it in the primary Google Apps domain or a secondary?


Regards,

Jay Lee
LCS Deployment Lead   |  ⚡ Dito




To unsubscribe from this group, send email to

JuanH

unread,
Jul 19, 2012, 9:22:49 AM7/19/12
to google-ap...@googlegroups.com
Yes to all three. I am a super admin (I created the oauth). Calender is in same GApps instance, with same domain name (at primary domain). 

Confirmed this by running 'gam user <user> show calendars'.

Jay Lee

unread,
Jul 19, 2012, 9:27:21 AM7/19/12
to google-ap...@googlegroups.com
Hi Juan,

  My apologies, I forgot that you can't use an anonymous OAuth client id and secret with that command. You'll need to follow the steps at:


except instead of turning on the Groups Settings API, turn on the Google Calendar API. You should be able to just turn the calendar API on without having to request access and manually wait for Google to approve.

Again sorry, apparently you're the guinea pig on trying out calendar wipe :-) I'll be sure to update the docs with these details.


Regards,

Jay Lee
LCS Deployment Lead   |  ⚡ Dito




To unsubscribe from this group, send email to

JuanH

unread,
Jul 19, 2012, 9:46:29 AM7/19/12
to google-ap...@googlegroups.com
Awesome, that worked!

Thanks for the help. Glad to have been involved!

JoeB

unread,
Jul 29, 2012, 6:14:07 PM7/29/12
to google-ap...@googlegroups.com
Hi Jay,

I'm having the same issue, except that I tried creating the OAuth client token (2 actually, with separate accounts) and it's still not working.

Any ideas?

Joe

Jay Lee

unread,
Jul 30, 2012, 7:48:30 AM7/30/12
to google-ap...@googlegroups.com
Hi Joe,

  Are you using Google Apps for Business?

  Are you certain the user you are authenticating with is a Super Admin?

  Can you login with that user and verify that you have full access to any user's calendar?



Regards,

Jay Lee
LCS Deployment Lead   |  ⚡ Dito




To unsubscribe from this group, send email to

JoeB

unread,
Jul 30, 2012, 8:16:32 AM7/30/12
to google-ap...@googlegroups.com
The answer to all 3 questions is Yes.

Jay Lee

unread,
Jul 30, 2012, 8:21:27 AM7/30/12
to google-ap...@googlegroups.com
What does "gam oauth info" show? (Be sure not to post your full key/secret, just X them out)


Regards,

Jay Lee
LCS Deployment Lead   |  ⚡ Dito




To unsubscribe from this group, send email to

JoeB

unread,
Jul 30, 2012, 8:33:15 AM7/30/12
to google-ap...@googlegroups.com

JoeB

unread,
Aug 14, 2012, 1:56:42 PM8/14/12
to google-ap...@googlegroups.com
Hi Jay,

Any update to this?

Cliff Wakefield

unread,
Sep 16, 2012, 7:10:03 PM9/16/12
to google-ap...@googlegroups.com
We just had the need to clear the primary calendars of 60 users.

So we turned to gam to do the task as we were pleased when the wipe command was included.

When it came to do the clearing of the calendars GAM kept reporting 403 errors.

We wiped out oauth details even though they were created with GAM 2.51, this still didn't help.


So I got that script setup and tried it, sure enough it worked.

Now it doesn't use my administrator oauth details, instead it uses the domains oauth consumer key.

Jay any update on what is going on with GAM and clearing calendars as we will have to clear another 70-80 in a few weeks time.

Thanks
Hi Jay,

Awesome, that worked!

Showing this:


To unsubscribe from this group, send email to
google-apps-manager+unsubscribe...@googlegroups.com
For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager

--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to

To unsubscribe from this group, send email to
google-apps-manager+unsubscribe...@googlegroups.com
For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager

--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to

To unsubscribe from this group, send email to
google-apps-manager+unsubscribe...@googlegroups.com
For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager

--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to

To unsubscribe from this group, send email to
google-apps-manager+unsubscribe...@googlegroups.com
For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager

--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to

To unsubscribe from this group, send email to
google-apps-manager+unsubscribe...@googlegroups.com
For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager

--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to

JuanH

unread,
Sep 17, 2012, 3:36:23 AM9/17/12
to google-ap...@googlegroups.com
Hi Cliff,

Did you follow these steps to enable the Google Calender API? This is what I needed to do to not get the 403 errors: 

NB: Instead of turning on the Groups Settings API, turn on the Google Calendar API. 

JuanH

Cliff Wakefield

unread,
Sep 17, 2012, 4:02:00 AM9/17/12
to google-ap...@googlegroups.com
Hi Juanh,

Yes the Calendar API was enabled in the Google API Console associated with the oauth admin user. 


Cliff Wakefield
Technical Lead,GoogleApps@RMIT
Information Technology Service
RMIT University
Postal: GPO Box 2476, Melbourne, Victoria, Australia 3001
Location: Building 158, 300 Queen Street,Melbourne, Australia 3000
Email:cliff.wakefield@rmit.edu.au
Hi Jay,

--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to
google-ap...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager

--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to
google-ap...@googlegroups.com
To unsubscribe from this group, send email to

Cliff Wakefield

unread,
Oct 11, 2012, 8:48:51 PM10/11/12
to google-ap...@googlegroups.com
Any update from anyone on why this doesn't work?

We are about to need to clear 76 users primary calendars and I still receive a 'Error: 403 - Forbidden' when attempting a wipe on a user in the primary or secondary domains.

I have generated oauth time and time again, I have the correct API's enabled in Google Code API Console.

I have no idea what is going wrong?

Anyone got this to actually work?

Lee Schneider

unread,
Feb 11, 2013, 7:52:12 AM2/11/13
to google-ap...@googlegroups.com
Same as other posters - calendar API enabled, using Oauth2 token, confirmed via gam oauth info; I'm able to wipe the calendar of the admin user who created the oauth2 token, but when I try to wipe any other calendars, I get 403 - forbidden.

Also tried  http://code.google.com/p/enterprise-deployments/source/browse/trunk/apps/python/calendar/clear_user_calendars.py, per the earlier poster, but I ran into a roadblock because of the oauth deprecation in favor of oauth2. 

So has anyone been able to administratively wipe user calendars, either with GAM or through other means?

Lee



Lee Schneider
Director of Apps Services/Senior Consultant
ArcSource Consulting Inc.
cell: 510.397.9733


On Sun, Jan 13, 2013 at 5:50 PM, Nicholas Trevatt <nicholas...@dialog-ge.com> wrote:
Hi,

This is also not working for me.

I've revoked the oAuth.  Reauthorized oAuth.  Delete the local oAuth.txt file
Enabled the Calendar API at https://code.google.com/apis/console

But, I get Error: 403 - Forbidden on a Wipe attempt.

I have 60 users that I need to wipe and re-migrate asap.  

Any further insight into this ?
Cheers,
Nicholas
--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To post to this group, send email to google-ap...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-man...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-apps-manager?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Juan Haywood

unread,
Feb 11, 2013, 7:56:18 AM2/11/13
to google-ap...@googlegroups.com
Not sure why some others are having issues. This worked perfectly for me. The trick in my case was to not use an anonymous OAuth client id and secret with that command. I needed to follow the steps at:


except instead of turning on the Groups Settings API, I turned on the Google Calendar API. I was able to just turn the calendar API on without having to request access and manually wait for Google to approve.

Juan Haywood Sales Engineer
[ RSA tel ] +27 (0) 21 466 9400
[ email ] jhay...@groveis.com
[ web ] www.groveis.com 



To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.

Lee Schneider

unread,
Feb 12, 2013, 9:34:38 PM2/12/13
to google-ap...@googlegroups.com
Thanks for the reply Juan. I know the GAM info says this can be used to delete a user's primary calendar. By any chance, have you tried it on sub-calendars and/or resource calendars?

Juan Haywood

unread,
Feb 15, 2013, 5:22:00 AM2/15/13
to google-ap...@googlegroups.com
I have not. I'll try to do so when I have some time.

Juan Haywood Sales Engineer
Google Premier Enterprise Reseller
DDI: +27 21 466 9405
Email: jhay...@groveis.com
Web: www.groveis.com
Confidentiality Notice. This email contains Privileged and/or Confidential Information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of the Grove Group shall be understood as neither given nor endorsed by it. This mail is sent from the Grove Group of companies.

Jason L.

unread,
Mar 2, 2013, 3:38:33 PM3/2/13
to google-ap...@googlegroups.com
I'm having the same problem... I believe I'm using GAM 2.55. Tried to revoke the key and recreate it.  still no luck. Would love to get this working as I have to wipe my CEOs calendar and reimport it...
To unsubscribe from this group, send email to google-apps-manager+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" 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-ap...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" 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-ap...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

onixterry

unread,
May 13, 2013, 3:34:35 PM5/13/13
to google-ap...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages