Q:

Share a calendar of impersonated account with all users of a domain

I have a service account impersonated with the account slave@company.tn.
I inserted the calendar of slave@company.tn to the list of calendars of the service account.
Now I'd like to share that calendar (of the impersonated account) with all the users of the domain company.tn.
--> So that calendar becames in the list of calendars of each user in the domain company.tn
My code after create the calendar is:
AclRule rule = new AclRule();
        Scope scope = new Scope();
        scope.setType("domain").setValue("default");
        rule.setScope(scope).setRole("reader");

        // Insert new access rule
        AclRule createdRule = service.acl().insert("slave@company.tn", rule).execute();
        System.out.println(createdRule.getId());

Am I in the right way ?.
Any suggestion is appreciated. 
Big thanks.

A:

You are on the right way, the only problem is the line
scope.setType("domain").setValue("default");:
For type domain, the correct value for the scope would be the actual name of the domain rather than "default".
Keep in mind: The service account needs t be assigned owner, not writer in order to share the calendar with the domain.

