13,721 questions
OptOutOfCustomerEmail = true when creating appointment still sends appointment confirmation
Jason Rea
6
Reputation points
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);
Microsoft Security | Microsoft Graph
Sign in to answer