Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,048 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
If I create an appointment via the Graph API using the .NET SDK (C#) and set OptOutOfCustomerEmail
to true
, the customer still receives the confirmation email. I am sending my own confirmation and reminder emails so that I can customize the content and use my own email/SMS infrastructure. I have turned off all reminders in the service configuration, and while I don't get any reminders, I still get the confirmation message when creating the appointment. What am I not understanding here? Is there some other way to force these confirmation emails to not be sent?
var appointmentToBook = new BookingAppointment
{
CustomerId = bookingsCustomerId,
Start = DateTimeTimeZone.FromDateTimeOffset(request.Start, request.TimeZone),
End = DateTimeTimeZone.FromDateTimeOffset(request.End, request.TimeZone),
ServiceId = request.ServiceId,
StaffMemberIds = new[] { request.StaffId },
CustomerPhone = request.CustomerPhone,
CustomerEmailAddress = request.CustomerEmail,
CustomerName = $"{request.FirstName} {request.LastName}",
OptOutOfCustomerEmail = true
};
var newAppointment = await _graphServiceClient.BookingBusinesses[_appSettings.BookingsBusinessId]
.Appointments
.Request()
.AddAsync(appointmentToBook);