Unable to create Calendar invite with CC and BCC options using powershell script

Dileep Uvaraj (INFOSYS LIMITED) 0 Reputation points Microsoft External Staff
2024-12-10T17:05:34.4833333+00:00

Team,

I am using powershell script to create a calendar invite but I don't see that option to add BCC and CC. Aditionally I am trying to disable forward option but it's not working.

Powershell command:

$params = @{

subject = $sessionTitle

body = @{

	contentType = "HTML"

	content = $sessionContent

}

start = @{

	dateTime = $sessionStartTime

	timeZone = "Pacific Standard Time"

}

end = @{

	dateTime = $sessionEndTime

	timeZone = "Pacific Standard Time"

}

sensitivity = "Confidential"

location = @{

	displayName = "invite"

}

attendees = @(

        @{

            emailAddress = @{

                address = $sendersEmail

            }

            type = "required"                

        }

)

isOnlineMeeting = $true

onlineMeetingProvider = "teamsForBusiness"

allowNewTimeProposals = $false

}

Write-Output 'params:'$params

New-MgUserCalendarEvent -UserId $userid -CalendarId $calendarId -BodyParameter $params

Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-12-11T08:17:18.4466667+00:00

    Hello Dileep Uvaraj (INFOSYS LIMITED),

    Thank you for reaching out to Microsoft Support!

    According to the documentation, when we use the Graph API to create an event, the request body is an event object, the object does not have the attributes of BCC and CC, but the attendees attribute is a set, you can send the user you need to fill in the set.

    Screenshot 2024-12-11 081415

    For disabled forwarding can refer to the case, using extended attributes. This is a solution shared by other users, but it does not always work, you can try it.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments

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.