Hi, I am trying to find a way to get the ID of a calendar within a Microsoft Teams Team. I have tried using Microsoft Graph to return all calendars information assigned to me, and this works, however it does not include any Teams Channel Calendar.
I have viewed other posts on this topic:
But they don't work and don't follow what I am trying to do.
I have a PowerApp which a user will enter their birthday. This birthday is recorded in a list and triggers a flow. This flow takes the birthday and creates an all-day birthday event in a Shared Calendar so everyone can see. I need your help in getting the ID of a Shared Calendar (or the ID of a Teams Channel Calendar [same thing]) so the event will be posted there (yes my account has permissions to create events in that calendar).
Thanks!
Solved! Go to Solution.
Well I need the ID of the group to be able to run that command. I was finally able to find it by running the Graph command below which tells me what groups I am apart of.
https://graph.microsoft.com/v1.0/me/transitiveMemberOf/microsoft.graph.group?$count=true
Once I ran that, I could find the ID of the group I am looking for, and then use your command to get the calendar's ID:
https://graph.microsoft.com/v1.0/groups/{id}/calendar?$select=id
From that I can get the ID of the shared calendar. So thank you there.
My next problem I have now is power automate giving me an error when I try to use the ID when using the create-an-event action.
😞
Error: The specified object was not found in the store.
Hi @Schwartz_Cory,
The Get Calendar method in Graph API also supports GET /groups/{id}/calendar, have you tried that one?
https://docs.microsoft.com/en-us/graph/api/calendar-get?view=graph-rest-1.0&tabs=http
Try something like below:
https://graph.microsoft.com/v1.0/groups/{id}/calendar?$select=id
Well I need the ID of the group to be able to run that command. I was finally able to find it by running the Graph command below which tells me what groups I am apart of.
https://graph.microsoft.com/v1.0/me/transitiveMemberOf/microsoft.graph.group?$count=true
Once I ran that, I could find the ID of the group I am looking for, and then use your command to get the calendar's ID:
https://graph.microsoft.com/v1.0/groups/{id}/calendar?$select=id
From that I can get the ID of the shared calendar. So thank you there.
My next problem I have now is power automate giving me an error when I try to use the ID when using the create-an-event action.
😞
Error: The specified object was not found in the store.
This is an alternative solution I am currently attempting to resolve my error, so I will close out this forum.
Solved: Get and create events in a shared calendars - Power Platform Community (microsoft.com)
Thanks for your help!
Hello,
I am trying to also find the ID for a Teams Calendar so that I can copy events to another Teams Calendar. I am a member of both Teams, but I am unable to find the ID for the team using the
https://graph.microsoft.com/v1.0/me/transitiveMemberOf/microsoft.graph.group?$count=true
command. I just get the following results
I have added all the consents I can think of, but I can't seem to get past this first hurdle. Any help would be greatly appreciated as I have two Teams Channel Calendar Id's to find.
To get the ID for a team your apart of, use this graph command here:
https://graph.microsoft.com/v1.0/me/joinedTeams
Pro Tip: Use CTRL+F to search for the name of your team. The ID will be the first one.
Then, use that ID to search for the team's calendar ID
https://graph.microsoft.com/v1.0/groups/{INSERT GROUP ID}/calendar?$select=id
Thank you so much! I now have a new issue, when I try and use the second search I get the following result:
I have given myself all the directory and calendar permissions, what other permissions do I need? I am a global admin for my company?? Sorry this is the first time I have worked in graph and I am a bit lost on how it works.
Not sure, I am not a global admin. I would make sure you are listed as an owner of the team. I think you can do this through Teams or Teams Admin Center.
To get more then just the team's calendar id, you can also try using this code below:
https://graph.microsoft.com/v1.0/groups/{INSERT GROUP ID}/calendar
User | Count |
---|---|
88 | |
39 | |
23 | |
20 | |
16 |
User | Count |
---|---|
129 | |
50 | |
48 | |
35 | |
26 |