Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do you add a Google Calendar to all users for a domain?
    primarykey
    data
    text
    <p>I am having trouble figuring out how to add a calendar to all of a domain's users' <code>CalendarList</code>.</p> <p>So far I can successfully create the <code>Calendar</code> and create a domain wide <code>ACL</code> but I don't know how to insert the calendar into domain users' lists.</p> <p>Using the ruby client API it looks something like this:</p> <pre><code>client = Google::APIClient.new service = client.discovered_api("calendar", "v3") calendar_response = JSON.parse(client.execute(:api_method =&gt; service.calendars.insert, :body =&gt; JSON.dump({"summary" =&gt; "events"}), :headers =&gt; { "Content-Type" =&gt; "application/json" }).response.body) rule = { "scope" =&gt; { "type" =&gt; "domain", "value" =&gt; domain, }, "role" =&gt; "writer" } acl_result = client.execute(:api_method =&gt; service.acl.insert, :parameters =&gt; { "calendarId" =&gt; calendar_response["id"] }, :body =&gt; JSON.dump(rule), :headers =&gt; { "Content-Type" =&gt; "application/json" }) </code></pre> <p>This all works fine. It creates the calendar and it is shared with everyone in the domain. What I can't figure out is how to explicitly added it to the users' list of Calendars.</p> <p>To add to the single authed user's calendar list would look like this:</p> <pre><code>list_params = { "calendarId" =&gt; calendar_response["id"], "hidden" =&gt; false, "selected" =&gt; true } calendar_list_result = client.execute(:api_method =&gt; service.calendar_list.insert, :body =&gt; JSON.dump(list_params), :headers =&gt; { "Content-Type" =&gt; "application/json" }) </code></pre> <p>Questions:</p> <ul> <li>If I am authenticated as a domain admin, can I create <code>CalendarList</code> item for all users?</li> <li>If so, can it be done with a single command or do I need to make a call with every user id?</li> <li>If I need to do a command for each user, how do I get the user ids?</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload