Ben
Ben

Reputation: 13352

Connecting a Logic App to a resource calendar

I have a resource (a room) that I'd like to be able to get information about, and make a report about.

The system pulls the events from a calendar, sends the list to a Function App for processing, and then sends an email. it works very nicely using my own calendar. My struggle is getting it to do that but with the room's calendar.

Using the Graph Explorer I can get the information I need using:

https://graph.microsoft.com/v1.0/users/[email protected]/events

I can use the graph explorer to get the ID of the calendar too: https://graph.microsoft.com/v1.0/users/[email protected]/calendars Which returns:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('roomname%40bvn.com.au')/calendars",
    "value": [
        {
            "id": "A very very long string",
            "name": "Calendar",
            "color": "auto",
            "changeKey": "something/somethingElse==",
            "canShare": true,
            "canViewPrivateItems": true,
            "canEdit": true,
            "owner": {
                "name": "RoomName",
                "address": "[email protected]"
            }
        }
    ]
}

But, when I put that ID into the logic app connector:

a screenshot of the logic app connector

I get an error:

{
  "status": 404,
  "message": "The specified object was not found in the store.\r\nclientRequestId: anID\r\nserviceRequestId: anotherID",
  "error": {
    "message": "The specified object was not found in the store."
  },
  "source": "office365-ae.azconn-ae.p.azurewebsites.net"
}

I have tried using the email address of the resource and I have tried a few other IDs, but to no avail.

Upvotes: 0

Views: 732

Answers (1)

Hury Shen
Hury Shen

Reputation: 15734

I test it in my side with initialize a variable to store the id of a calendar. Then use this variable as the calendar id to get events, it works fine.

enter image description here

So please check if the type and the format of your calendar id are correct, the logic app connector can implement this requirement.

Upvotes: 1

Related Questions