Escolha a permissão ou permissões marcadas como menos privilegiadas para esta API. Utilize uma permissão ou permissões com privilégios mais elevados apenas se a sua aplicação o exigir. Para obter detalhes sobre as permissões delegadas e de aplicação, veja Tipos de permissão. Para saber mais sobre estas permissões, veja a referência de permissões.
Tipo de permissão
Permissões com menos privilégios
Permissões com privilégios superiores
Delegado (conta corporativa ou de estudante)
VirtualEvent.ReadWrite
Indisponível.
Delegado (conta pessoal da Microsoft)
Sem suporte.
Sem suporte.
Aplicativo
Sem suporte.
Sem suporte.
Solicitação HTTP
POST /solutions/virtualEvents/webinars/{webinarId}/registrationConfiguration/questions
Pode especificar as seguintes propriedades quando criar um virtualEventRegistrationCustomQuestion.
Propriedade
Tipo
Descrição
answerChoices
Coleção de cadeias de caracteres
Escolhas de resposta quando answerInputType é singleChoice ou multiChoice.
answerInputType
virtualEventRegistrationQuestionAnswerInputType
Tipo de entrada da resposta à pergunta de registo. Os valores suportados são text, multilineText, singleChoice, , multiChoicee booleanunknownFutureValue.
displayName
Cadeia de caracteres
Nome a apresentar da pergunta de registo.
isRequired
Booliano
Indica se é necessária uma resposta à pergunta. O valor padrão é false.
Pode especificar a seguinte propriedade quando criar uma virtualEventRegistrationPredefinedQuestion.
Propriedade
Tipo
Descrição
rótulo
virtualEventRegistrationPredefinedQuestionLabel
Etiqueta da pergunta de registo predefinida. Os seguintes valores de etiqueta aceitam uma única linha de texto: street, city, state, postalCode, countryOrRegion, industry, jobTitle, , organizatione 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)