OptOutOfCustomerEmail = true when creating appointment still sends appointment confirmation

Jason Rea 6 Reputation points
2021-07-21T18:00:57.25+00:00

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 Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,048 questions
0 comments No comments
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.