Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
VirtualEvent.ReadWrite
Not available.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
Not supported.
Not supported.
HTTP request
POST /solutions/virtualEvents/webinars/{webinarId}/registrationConfiguration/questions
You can specify the following properties when you create a virtualEventRegistrationCustomQuestion.
Property
Type
Description
answerChoices
String collection
Answer choices when answerInputType is singleChoice or multiChoice.
answerInputType
virtualEventRegistrationQuestionAnswerInputType
Input type of the registration question answer. The supported values are text, multilineText, singleChoice, multiChoice, boolean, and unknownFutureValue.
displayName
String
Display name of the registration question.
isRequired
Boolean
Indicates whether an answer to the question is required. Default value is false.
You can specify the following property when you create a virtualEventRegistrationPredefinedQuestion.
Property
Type
Description
label
virtualEventRegistrationPredefinedQuestionLabel
Label of the predefined registration question. The following label values accept a single line of text: street, city, state, postalCode, countryOrRegion, industry, jobTitle, organization, and unknownFutureValue.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new VirtualEventRegistrationCustomQuestion
{
OdataType = "#microsoft.graph.virtualEventRegistrationCustomQuestion",
DisplayName = "What's your job position?",
AnswerInputType = VirtualEventRegistrationQuestionAnswerInputType.MultiChoice,
AnswerChoices = new List<string>
{
"Software Engineer",
"Engineer Manager",
"Product Manager",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.VirtualEvents.Webinars["{virtualEventWebinar-id}"].RegistrationConfiguration.Questions.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewVirtualEventRegistrationQuestionBase()
displayName := "What's your job position?"
requestBody.SetDisplayName(&displayName)
answerInputType := graphmodels.MULTICHOICE_VIRTUALEVENTREGISTRATIONQUESTIONANSWERINPUTTYPE
requestBody.SetAnswerInputType(&answerInputType)
answerChoices := []string {
"Software Engineer",
"Engineer Manager",
"Product Manager",
}
requestBody.SetAnswerChoices(answerChoices)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
questions, err := graphClient.Solutions().VirtualEvents().Webinars().ByVirtualEventWebinarId("virtualEventWebinar-id").RegistrationConfiguration().Questions().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
VirtualEventRegistrationCustomQuestion virtualEventRegistrationQuestionBase = new VirtualEventRegistrationCustomQuestion();
virtualEventRegistrationQuestionBase.setOdataType("#microsoft.graph.virtualEventRegistrationCustomQuestion");
virtualEventRegistrationQuestionBase.setDisplayName("What's your job position?");
virtualEventRegistrationQuestionBase.setAnswerInputType(VirtualEventRegistrationQuestionAnswerInputType.MultiChoice);
LinkedList<String> answerChoices = new LinkedList<String>();
answerChoices.add("Software Engineer");
answerChoices.add("Engineer Manager");
answerChoices.add("Product Manager");
virtualEventRegistrationQuestionBase.setAnswerChoices(answerChoices);
VirtualEventRegistrationQuestionBase result = graphClient.solutions().virtualEvents().webinars().byVirtualEventWebinarId("{virtualEventWebinar-id}").registrationConfiguration().questions().post(virtualEventRegistrationQuestionBase);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.virtual_event_registration_custom_question import VirtualEventRegistrationCustomQuestion
from msgraph.generated.models.virtual_event_registration_question_answer_input_type import VirtualEventRegistrationQuestionAnswerInputType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = VirtualEventRegistrationCustomQuestion(
odata_type = "#microsoft.graph.virtualEventRegistrationCustomQuestion",
display_name = "What's your job position?",
answer_input_type = VirtualEventRegistrationQuestionAnswerInputType.MultiChoice,
answer_choices = [
"Software Engineer",
"Engineer Manager",
"Product Manager",
],
)
result = await graph_client.solutions.virtual_events.webinars.by_virtual_event_webinar_id('virtualEventWebinar-id').registration_configuration.questions.post(request_body)
POST https://graph.microsoft.com/v1.0/solutions/virtualEvents/webinars/f4b39f1c-520e-4e75-805a-4b0f2016a0c6@a1a56d21-a8a6-4a6b-97f8-ced53d30f143/registrationConfiguration/questions
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.VirtualEvents.Webinars["{virtualEventWebinar-id}"].RegistrationConfiguration.Questions.PostAsync(null);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
questions, err := graphClient.Solutions().VirtualEvents().Webinars().ByVirtualEventWebinarId("virtualEventWebinar-id").RegistrationConfiguration().Questions().Post(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
VirtualEventRegistrationQuestionBase result = graphClient.solutions().virtualEvents().webinars().byVirtualEventWebinarId("{virtualEventWebinar-id}").registrationConfiguration().questions().post(null);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.solutions.virtual_events.webinars.by_virtual_event_webinar_id('virtualEventWebinar-id').registration_configuration.questions.post(None)