Skip to main content

Notifications

Community site session details

Community site session details

Session Id : fuI97zignteu7TXYPdbcz6
Power Apps - Building Power Apps
Answered

Finding calendar Id.

Like (0) ShareShare
ReportReport
Posted on 4 Oct 2022 16:51:29 by 114

Hi 

 

I've made a Flow for my PowerApp that creates an event in a outlook calendar when the leave is approved. It works when I use it, but obviously when another user tries to use this flow, they are trying to create an event using my Outlook account and therefore it fails.

 

I think I've worked out a way to make this works but I need the user of the app's calendar Id to be called, however, I can't seem to do this in Power Apps.

 

I have tried the following in the Items control of a dropdown box:

 

LookUp(Office365Outlook.CalendarGetTablesV2().value, name = "Calendar").id

 

However, this does not provide me with the Calendar Id, it fails.

 

Am I trying to achieve the impossible or is my syntax just bad?

 

Many thanks, and apologies if I've not been clear at any point in this post.

 

Many thanks

 

 

 

 

Categories:
  • ctedesco3307 Profile Picture
    623 on 03 Apr 2024 at 21:41:34
    Re: Finding calendar Id.

    Is there a way to get a Meeting Room's Calendar ID? 

  • JPiercefield Profile Picture
    85 on 05 Oct 2022 at 13:10:54
    Re: Finding calendar Id.

    An instant cloud flow is one you trigger on demand or one that triggers when it detects whatever logic you've built to trigger it. An automated cloud flow is one that is scheduled and not relying on a specific trigger.

  • BenBennett321 Profile Picture
    114 on 05 Oct 2022 at 13:09:17
    Re: Finding calendar Id.

    Thank you for taking the time to explain this to me, it's really appreciated.

     

    I'm not sure I quite understand the difference between a "(an instant cloud flow)" and a  "(an automated cloud flow)"

     

    What defines a "instant cloud flow" is it purely that it is called by a .run function in Powerapps? (My flow is called this way)

     

    I'm not sure I quite understand why the formula wouldn't work in an Items part of a dropdown, but I do know that indicates a large gap in my knowledge. If there is any documentation you can think of to help me on this it would be appreciated, but if nothing springs to mind please don't utilise anymore of your time on it.

     

    thanks again.

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 04 Oct 2022 at 18:26:42
    Re: Finding calendar Id.

    @BenBennett321 

    Also, I should add...depending on how you are instantiating your PowerAutomate flow, you will need certain permissions to be able to carry out what you are trying to do.

     

    For example, if your flow is triggered by PowerApps with a .Run (an instant cloud flow), then it will be using the users' Calendar anyway as the connector is always used in the context of the user for a flow like that.

     

    If the flow is triggered by some other event (an automated cloud flow), then it will be under the context of the account set for the flow.

     

    SO...in regard to that last point - if the flow is an automated flow, then the account the flow is set for must have permission to the calendar of the user in order to carry out what you want.

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 04 Oct 2022 at 18:22:12
    Re: Finding calendar Id.

    @BenBennett321 

    That is all good...but you were stating that you were using a record with an id for the table of items for a dropdown!'

    That will not work (or at least it is not a use for a dropdown)

     

    However, if you just want the id of the Calendar for the current user, then your formula is correct!

        LookUp(Office365Outlook.CalendarGetTablesV2().value, name = "Calendar").id

    If you use this return, then you will have the id.  (but not as an Items property)

     

     

     

     

     

  • JPiercefield Profile Picture
    85 on 04 Oct 2022 at 17:52:09
    Re: Finding calendar Id.

    Additionally, there are quite a few working solutions in this topic here. https://powerusers.microsoft.com/t5/General-Power-Automate/Easiuest-way-to-get-calendar-id-for-the-Office-365-Calendar/td-p/6279

     

  • JPiercefield Profile Picture
    85 on 04 Oct 2022 at 17:50:33
    Re: Finding calendar Id.

    You should be able to get the Calendar IDs using Graph Explorer

     

    https://developer.microsoft.com/en-us/graph/graph-explorer#

     

    More info here https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/calendar_get%C2%A0

     

     

  • BenBennett321 Profile Picture
    114 on 04 Oct 2022 at 17:39:13
    Re: Finding calendar Id.

    Thanks for your reply, Randy, I specifically want to find the Id n of the calendar called 'Calendar'. I need to know this as each ID will be different for each user although its name will always be "Calendar"

     

     Thanks, 

     

     

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 04 Oct 2022 at 17:27:45
    Re: Finding calendar Id.

    @BenBennett321 

    If you're using that formula for a dropdown Items property, then you really want to have a table, not a record (otherwise the dropdown is useless).

     

    Using the Items formula:  Office365Outlook.CalendarGetTablesV2().value

    will give you the table of calendars for your dropdown.

    Your Value field will be name.

    If you want to set the "Calendar" as selected, then the Default property would be "Calendar".

     

    The above assumes you are referring to a dropdown and NOT a combobox.

     

    I hope this is helpful for you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 83 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 54

#3
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

Overall leaderboard
Loading started