Why does it turn into an unavailable room when I create a google resource calendar with its API?

Hello, 
I am new to this environment and don't know if I posted my question in the right place or not. Anyway, I posted the following question on StackOverflow as well without any response yet. That's why I decided to raise that on the google community directly:

I'm going to create a google resource calendar room via its API (i.e. `https://admin.googleapis.com/admin/directory/v1/customer/my_customer/resources/calendars`). But the problem is, when I create one, it turns into an unavailable (crossed out) room within google calendar rooms and I couldn't find any attribute to make it available!

Here's the body request/response:

 

{
  "kind": "admin#directory#resources#calendars#CalendarResource",
  "etags": "\"CTyc505ppdmJR2motHVsU17kzItOkPo5vYViqlSF0rU/FB0b765ZgWIpTBaxn5YQIwZWWNM\"",
  "resourceId": "9f698cdc-84f9-4688-95a7-c2207b4fa7ae",
  "resourceName": "StackOverflow Test",
  "generatedResourceName": "Orangery Hildesheim Nordstadt-EG-StackOverflow Test (3)",
  "resourceEmail": "c_1881d77mmcaqsihgi426fseae6vnc@resource.calendar.google.com",
  "capacity": 3,
  "buildingId": "Orangery-Hildesheim-Nordstadt",
  "floorName": "EG",
  "resourceCategory": "CONFERENCE_ROOM"
}

 


Here's the output on google calendar:

i4iGh

Solved Solved
1 9 10.6K
1 ACCEPTED SOLUTION

After two months finally I found a solution!

In fact, the main problem is related to the lack of permission for those created resources for other users in the organization. To tackle this problem I used another google API named ACL (Access Control Level)<sup> ref</sup>, to set a privilege for other users. Basically, a google resource actually is a google resource calendar, so you can use ACL API to access that calendar. Moreover, the parameter to reach that calendar is `resourceEmail` as the unique ID of the respective resource calendar.

Here's the thing I did to make unavailable resources to be available (bookable):

 

 

{
"scope": {
"type": "domain",
"value": "orangery.io" # if you selected type as `domain` you should write your domain name here.
},
"role": "writer"
}

 



---
[**NOTE**]:

With this procedure, you will need to the `https://www.googleapis.com/auth/calendar` authorization scope as well.

View solution in original post

9 REPLIES 9

Unsure if its related but I am having the same issue with a resource created within Google Admin. The resource is shown as unavailable when trying to add it to calendar events but if you add it anyway it will accept the invite as its actually free at the time.

I’m also having the exact same issue. Have raised a ticket with google

In the end our resource started working correctly a day later. No idea why. I created another resource as a test and it also appears unavailable after being created. Might be a timing issue.

Thanks for reporting back and glad its fixed for you! I'm waiting for confirmation from my client to see if it fixed itself over the weekend

After two months finally I found a solution!

In fact, the main problem is related to the lack of permission for those created resources for other users in the organization. To tackle this problem I used another google API named ACL (Access Control Level)<sup> ref</sup>, to set a privilege for other users. Basically, a google resource actually is a google resource calendar, so you can use ACL API to access that calendar. Moreover, the parameter to reach that calendar is `resourceEmail` as the unique ID of the respective resource calendar.

Here's the thing I did to make unavailable resources to be available (bookable):

 

 

{
"scope": {
"type": "domain",
"value": "orangery.io" # if you selected type as `domain` you should write your domain name here.
},
"role": "writer"
}

 



---
[**NOTE**]:

With this procedure, you will need to the `https://www.googleapis.com/auth/calendar` authorization scope as well.

Same here. I was facing the same issue from last couple of weeks, Posted on many forums but couldn't found any proper solution. Do let me know if you find!

Did your calendar ever start functioning correctly? If so, what did you do?

This was solved for me by enabling

"Allow users to book resources that are shared as 'See only free/busy'"

in 

Apps -> Google Workspace -> Settings for Calendar -> General settings

Thanks, this was the fix! This is an obscure setting that IMO should be enabled by default.

Top Solution Authors