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 / Create Microsoft Teams...
Power Apps
Unanswered

Create Microsoft Teams Meeting in canvas app

(2) ShareShare
ReportReport
Posted on by 21
Hi , I am trying to create Microsoft Teams Meeting in canvas app this is the code I am using but it is throwing errors. Can you please help me.
 
Set(
    MeetingAttendees,
    Table(
        {Mail: "lisa.samule@gmail.com"},
        {Mail: "cabbie.fernd@gmail.com"}
    )
);
 
Set(
    Var1Meeting,
    MicrosoftTeams.CreateTeamsMeeting(
        LookUp(
            Office365Outlook.CalendarGetTables().value,
            DisplayName = "Calendar"
        ).Name,
        DataCardValue8.Text, // Subject
        {
            content: DataCardValue4.Text,
            contentType: "html"
        },
        "GMT Standard Time",
        {
            dateTime: Text(
                DateAdd(
                    DateValue(DateValue3.SelectedDate,
                    Value(HourValue3.SelectedText),
                    Hours) + TimeValue((MinuteValue3.SelectedText & ":00"),
                "yyyy-mm-ddThh:mm:ss"
            )
        },
        {
            dateTime: Text(
                DateAdd(
                    DateValue(DateValue4.SelectedDate),
                    Value(HourValue4.SelectedText.Value),
                    Hours
                ) + Time(0, Value(MinuteValue4.SelectedText.Value), 0),
                "yyyy-mm-ddTHH:mm:ss"
            )
        },
        true,
        "teamsForBusiness",
        {
            requiredAttendees: Concat(MeetingAttendees, Mail, ";")
        }
    )
);
 
SubmitForm(Form1);
ResetForm(Form1);
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
    HI @bn333
     
    Please share the errors you are getting.
  • bn333 Profile Picture
    21 on at
    Date time errors.
  • Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
    HI @bn333
     
    That is not an error. Please share the actual errors, showing us where they are happening so we can help.
     
    I cannot tell if you have conversion errors, or issues due to NULLS or blanks or what based on what you said.
     
    If you want help please share more, showing us what you see :-) we don't want to have to go back and forth pulling it out hehe if you want help
  • Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
    Hi @bn333
     
    Please. respect the people on the forums. If you post, respond to people.
  • oyepanky Profile Picture
    361 on at
    Hi @bn333,

    You used an incorrect formula; the correct formula is below with comments.
    • Incorrect use of CalendarGetTables() and LookUp()
    • The nested DateAdd() and Text() parts are syntactically broken
    • Wrong parameter structure for CreateTeamsMeeting()
       
    // Step 1: Define attendees
    Set(
        MeetingAttendees,
        Table(
            {Mail: "lisa.samule@gmail.com"},
            {Mail: "cabbie.fernd@gmail.com"}
        )
    );
    // Step 2: Create Teams meeting
    Set(
        VarMeeting,
        MicrosoftTeams.CreateTeamsMeeting(
            Text(
                DateAdd(
                    DateValue(DatePickerStart.SelectedDate),
                    Value(DropdownStartHour.Selected.Value),
                    Hours
                ) + Time(0, Value(DropdownStartMinute.Selected.Value), 0),
                "yyyy-MM-ddTHH:mm:ss"
            ),
            Text(
                DateAdd(
                    DateValue(DatePickerEnd.SelectedDate),
                    Value(DropdownEndHour.Selected.Value),
                    Hours
                ) + Time(0, Value(DropdownEndMinute.Selected.Value), 0),
                "yyyy-MM-ddTHH:mm:ss"
            ),
            TextInputSubject.Text,
            Concat(MeetingAttendees, Mail, ";"),
            TextInputDescription.Text
        )
    );
    // Step 3: Save form if needed

    SubmitForm(Form1);
    ResetForm(Form1);
     


    Thank & Regards 
    Pankaj Jangid
     

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard