web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Book A Room template_O...
Power Apps
Unanswered

Book A Room template_Office365.FindMeetingTimes failed

(0) ShareShare
ReportReport
Posted on by

Hi 

When I updated the duration for existing meeting, the error message pop up was showed up.

The update could be completed successfully.

Office365.FindMeetingTimes failed: { "error": { "code": "BadArgument", "message": "Attendees must be added if the organizer is optional", "details": [ { "code": "UnsupportedScenario", "target": "IsOrganizerOptional", "message": "Attendees must be added if the organizer is optional" } ] } }
2.PNG11.png
Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Can you share more details with your apps?

    1. How did you create the meeting? can share the meeting setting?

    2. When did you meet the error? after selecting meeting and before selecting the room?

    3. Have your ever modify the app template?

     

    I have made a test, but don't have the issue you mentioned, the app works well all the time.

    Hopefully you can share more details. so that we can help you better.

    Best regards,

    Sik

  • Community Power Platform Member Profile Picture
    on at

    Hi @v-siky-msft 

     

    Thank you for your response.

     

    1. How did you create the meeting? can share the meeting setting?

    I used the Book A Room template. There are two options, I clicked to book a room for existing meetings. That meeting was created on Outlook. Not by the app.

     

    2. When did you meet the error? after selecting meeting and before selecting the room?

    I selected the meeting that i want to book a room for, and some times we need to adjust the meeting time , so as test, I changed the meeting time for existing meeting, and then book a room for it. When I clicked the Book, error happened.

     

    3. Have your ever modify the app template?

    No, I have not done any modification for this template.

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @Tiffany-Jo ,

     

    I had the same issue. In my case what was happening is that the corresponding value of RequiredAttendees variable was not loading before the FindMeetingTimes connector. So the connector didn't recognize the RequiredAttendees. I believe that you are having the same issue or your function to retrieve the RequiredAttendess address is not working as well. Can you send your function to OnVisible of this screen and the function to OnSelected of this button? When you book for a new meeting, is the same error showing up?

     

     

  • DiazjBen Profile Picture
    4 on at

    Sorry for reopening an old post, but I'm having this same issue with the same template. below is what is in the OnVisible section:

    Set(IsPrevRoomSelect, false);
    If(DateTimeRoomChange,
    Set(AvailableRoomsCounter, 1);
    UpdateContext({ShowLoading: true});
    Set(RoomsLeft, Blank());
    If(!NoRoomsList,
    ClearCollect(AllRooms, Office365.GetRoomsInRoomList(RoomsListsGallery.Selected.Address).value)
    );
    Set(DateTimeRoomChange, false);
    /*
    If(CountRows(AllRooms) > 20,
    Set(AllRoomsConnector, Concat(FirstN(AllRooms, 20), Address & ";"));
    If(CountRows(AllRooms) > 40,
    Set(AllRoomsConnector1, Concat(LastN(FirstN(AllRooms, 40), 20), Address & ";"))
    ),
    Set(AllRoomsConnector, Concat(AllRooms, Address & ";"))
    );
    */
    Set(AllRoomsConnector, Concat(FirstN(AllRooms, 20), Address & ";"));


    Concurrent(
    ClearCollect(AvailableRooms, Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector, IsOrganizerOptional: true,
    Start: StartDateTimeUTC, End: EndDateTimeUTC, MeetingDuration: DateDiff(StartDateTime, EndDateTime, Minutes),
    MinimumAttendeePercentage: "1", ActivityDomain: "Unrestricted"})),

    If(CountRows(AllRooms) > 20,
    If(CountRows(AllRooms) > 40,
    Set(AllRoomsConnector1, Concat(LastN(FirstN(AllRooms, 40), 20), Address & ";")),
    Set(AllRoomsConnector1, Concat(LastN(AllRooms, CountRows(AllRooms) - 20), Address & ";"))
    );
    ClearCollect(AvailableRooms1, Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector1, IsOrganizerOptional: true,
    Start: StartDateTimeUTC, End: EndDateTimeUTC, MeetingDuration: DateDiff(StartDateTime, EndDateTime, Minutes),
    MinimumAttendeePercentage: "1", ActivityDomain: "Unrestricted"})
    ),
    Clear(AvailableRooms1)
    )

    );
    If(CountRows(AllRooms) > 20,
    Collect(AvailableRooms, AvailableRooms1)
    );
    ClearCollect(AvailableRoomsSorted, SortByColumns(First(AvailableRooms).MeetingTimeSuggestions, "Confidence", Descending), If(CountRows(AllRooms) > 20, SortByColumns(Last(AvailableRooms).MeetingTimeSuggestions, "Confidence", Descending)));

    ClearCollect(AvailableRoomsConcat, Concat(Filter(First(AvailableRoomsSorted).AttendeeAvailability, Availability = "Free"),
    Attendee.EmailAddress.Address, ","), If(CountRows(AllRooms) > 20, Concat(Filter(Last(AvailableRoomsSorted).AttendeeAvailability, Availability = "Free"),
    Attendee.EmailAddress.Address, ",")));

    ClearCollect(AvailableRoomEmails, Split(First(AvailableRoomsConcat).Value, ","), If(CountRows(AllRooms) > 20, Split(Last(AvailableRoomsConcat).Value, ",")));

    ClearCollect(AvailableRoomEmailName, AddColumns(RenameColumns(AvailableRoomEmails, "Result", "Email"), "Name",
    LookUp(AllRooms, Email = Address).Name));
    UpdateContext({ShowLoading: false});
    Set(RoomsLeft, CountRows(AllRooms) - 40 * AvailableRoomsCounter)
    );
    Clear(AvailableRooms);
    Clear(AvailableRooms1)

    @Anonymous 

  • Community Power Platform Member Profile Picture
    on at

    Hi @DiazjBen 

     

    I think that you are having trouble with your Concurrent function. "You can't predict the order in which formulas within the Concurrent function start and end evaluation." (docs.microsoft.com). So the function that retrieves AllRoomsConnector1 could be running after the function that retrieves AvailableRooms1 that needs AllRoomsConnector1.

     

    Try to remove Concurrent function and let the script run in order. Make a test and post here the result.

  • DiazjBen Profile Picture
    4 on at

    I'm sorry, could you clarify exactly what I need to do? this is a pre-made template taken directly from samples on the powerapps page, I have very little familiarity with working with the code. I tried just taking out the concurrent container but now I'm getting an error, and I assume I need to replace it with something.

    Thank you for your help

     

    Edit

     

    Sorry, it looks like I figured out what the issue was. the problem was that the room list it was pulling from had no rooms in it, so it couldn't set a room as the organizer. adding a room to the list fixed the issue.

  • Community Power Platform Member Profile Picture
    on at

    First, replace all the code you posted for this one and let me know if it doesn't work.

    Set(IsPrevRoomSelect, false);
    If(DateTimeRoomChange,
    Set(AvailableRoomsCounter, 1);
    UpdateContext({ShowLoading: true});
    Set(RoomsLeft, Blank());
    If(!NoRoomsList,
    ClearCollect(AllRooms, Office365.GetRoomsInRoomList(RoomsListsGallery.Selected.Address).value)
    );
    Set(DateTimeRoomChange, false);
    If(CountRows(AllRooms) > 20,
    Set(AllRoomsConnector, Concat(FirstN(AllRooms, 20), Address & ";"));
    If(CountRows(AllRooms) > 40,
    Set(AllRoomsConnector1, Concat(LastN(FirstN(AllRooms, 40), 20), Address & ";"))
    ),
    Set(AllRoomsConnector, Concat(AllRooms, Address & ";"))
    );
    Set(AllRoomsConnector, Concat(FirstN(AllRooms, 20), Address & ";"));
    
    
    Concurrent(
    ClearCollect(AvailableRooms, Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector, IsOrganizerOptional: true,
    Start: StartDateTimeUTC, End: EndDateTimeUTC, MeetingDuration: DateDiff(StartDateTime, EndDateTime, Minutes),
    MinimumAttendeePercentage: "1", ActivityDomain: "Unrestricted"})),
    
    If(CountRows(AllRooms) > 20,
    If(CountRows(AllRooms) > 40,
    Set(AllRoomsConnector1, Concat(LastN(FirstN(AllRooms, 40), 20), Address & ";")),
    Set(AllRoomsConnector1, Concat(LastN(AllRooms, CountRows(AllRooms) - 20), Address & ";"))
    );
    ClearCollect(AvailableRooms1, Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector1, IsOrganizerOptional: true,
    Start: StartDateTimeUTC, End: EndDateTimeUTC, MeetingDuration: DateDiff(StartDateTime, EndDateTime, Minutes),
    MinimumAttendeePercentage: "1", ActivityDomain: "Unrestricted"})
    ),
    Clear(AvailableRooms1)
    )
    
    );
    If(CountRows(AllRooms) > 20,
    Collect(AvailableRooms, AvailableRooms1)
    );
    ClearCollect(AvailableRoomsSorted, SortByColumns(First(AvailableRooms).MeetingTimeSuggestions, "Confidence", Descending), If(CountRows(AllRooms) > 20, SortByColumns(Last(AvailableRooms).MeetingTimeSuggestions, "Confidence", Descending)));
    
    ClearCollect(AvailableRoomsConcat, Concat(Filter(First(AvailableRoomsSorted).AttendeeAvailability, Availability = "Free"),
    Attendee.EmailAddress.Address, ","), If(CountRows(AllRooms) > 20, Concat(Filter(Last(AvailableRoomsSorted).AttendeeAvailability, Availability = "Free"),
    Attendee.EmailAddress.Address, ",")));
    
    ClearCollect(AvailableRoomEmails, Split(First(AvailableRoomsConcat).Value, ","), If(CountRows(AllRooms) > 20, Split(Last(AvailableRoomsConcat).Value, ",")));
    
    ClearCollect(AvailableRoomEmailName, AddColumns(RenameColumns(AvailableRoomEmails, "Result", "Email"), "Name",
    LookUp(AllRooms, Email = Address).Name));
    UpdateContext({ShowLoading: false});
    Set(RoomsLeft, CountRows(AllRooms) - 40 * AvailableRoomsCounter)
    );
    Clear(AvailableRooms);
    Clear(AvailableRooms1)

      

    @DiazjBen 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard