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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Office365.CalendarPost...
Power Apps
Answered

Office365.CalendarPostItem

(0) ShareShare
ReportReport
Posted on by 8

Hello,

 

i tried to create an calendar entry out of powerapps, but the following error appears: Status 400: ID has wrong format.

Here the code i use:

 

Office365.CalendarPostItem(UserCalendar.Selected.DisplayName;Text(EndTimeDate.SelectedDate;DateTimeFormat.ShortDate);Text(StartTimeDate.SelectedDate;DateTimeFormat.ShortDate);Subject.Text)

 

Hope you can help.

 

Brgds,

Jens

Categories:
  • RezaDorrani Profile Picture
    12,145 on at

    Hi @JJ90 

     

    check and see if "UserCalendar.Selected.DisplayName" is giving a valid Calendar Name

     

    add a label and add text as UserCalendar.Selected.DisplayName to check

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

  • JJ90 Profile Picture
    8 on at

    Yes the name is displayed in label, but nothing happens.

    Is there anything wrong with the date and time?


    @RezaDorrani wrote:

    Hi @JJ90 

     

    check and see if "UserCalendar.Selected.DisplayName" is giving a valid Calendar Name

     

    add a label and add text as UserCalendar.Selected.DisplayName to check

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     


     

  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    Hi @JJ90 

     

    what name is displayed in UserCalendar.Selected.DisplayName

    Can you try hardcoding "Calendar" just to test first

     

    Office365.CalendarPostItem("Calendar";Text(EndTimeDate.SelectedDate;DateTimeFormat.ShortDate);Text(StartTimeDate.SelectedDate;DateTimeFormat.ShortDate);Subject.Text)

     

  • JJ90 Profile Picture
    8 on at

    Hi Reza,

     

    this worked :).

    It looks like there is a translation error of displayname, cause my settings are german and if I enter "Kalender" it doesn't work, but when i user "Calendar" it works. The funny thing is that when I use office365.CalendarGetTables() it returns the german names. Is there a solutio to translate the value? Cause I want to select the calendar from a dropdown. For now it is ok cause I just have 1 calendar.

     

    Brgds,

    Jens

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @JJ90 

     

    Glad it worked !!!

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello,

    Wondering if you are able to help me. I'm trying to use the CalendarPostItemV4 method.

    When i hard code in the dates, it works. However, when i try to use the dates the user has selected (the user is required to input 2 dates using a date picker) it doesnt seem to work. I cant seem to figure out why, the calendar ID is for sure correct, as it works when i hard code in the dates. Here is the code i am using.

     


    Set(_leaveStartString, Text(DateValue(LeaveEndDatePicker), "yyyy/mm/dd"));
    Set(_leaveEndString, Text(DateValue(LeaveStartDatePicker), "yyyy/mm/dd"));

     

    Office365Outlook.V4CalendarPostItem(
    varUserCalendarId,
    "Calendar subject text",
    _leaveStartString,
    _leaveEndString,
    "UTC"
    );

     

    And this is the error i get: error 400, at least one property failed

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard