Update authenticationEventsFlow
- Article
Namespace: microsoft.graph
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Update the properties of an authenticationEventsFlow object. Only the externalUsersSelfServiceSignupEventsFlow object type is supported.
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ❌ | ❌ | ✅ |
Permissions
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) | EventListener.ReadWrite.All | Not available. |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | EventListener.ReadWrite.All | Not available. |
For delegated scenarios, the administrator needs at least the External ID User Flow Administrator Microsoft Entra role.
HTTP request
PATCH /identity/authenticationEventsFlows/{authenticationEventsFlow-id}
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Content-Type | application/json. Required. |
Request body
In the request body, supply only the values for properties that should be updated. Existing properties that aren't included in the request body maintains their previous values or be recalculated based on changes to other property values.
The following table specifies the properties that can be updated.
You must include the @odata.type property with a value of the specific user flow type in the body. For example, "@odata.type": "#microsoft.graph.externalUsersSelfServiceSignupEventsFlow"
.
Property | Type | Description |
---|---|---|
id | String | The unique identifier for the entity. Read-only. |
displayName | String | The display name for the events policy. |
description | String | The description of the events policy. |
conditions | authenticationConditions | The conditions representing the context of the authentication request that is used to decide whether the events policy is invoked. |
priority | Int32 | The priority to use for each individual event of the events policy. If multiple competing listeners for an event have the same priority, one is chosen and an error is silently logged. |
onInteractiveAuthFlowStart | onInteractiveAuthFlowStartHandler | The configuration for what to invoke for the onInteractiveAuthFlowStart event. |
onAuthenticationMethodLoadStart | onAuthenticationMethodLoadStartHandler | The configuration for what to invoke for the onAuthenticationMethodLoadStart event. Must have at least one identity provider linked. |
onAttributeCollection | onAttributeCollectionHandler | The configuration for what to invoke for the onAttributeCollection event. |
onUserCreateStart | onUserCreateStartHandler | The configuration for what to invoke for the onUserCreateStart event. |
Response
If successful, this method returns a 204 No Content
response code. If unsuccessful, a 4xx
error is returned with specific details.
Examples
Example 1: Update the display name and priority of an authenticationEventsFlow
Request
The following example shows a request that updates the display name of a specific external identities user flow (an authentication event type), as well as the priority for all the listeners associated with the policy.
PATCH https://graph.microsoft.com/beta/identity/authenticationEventsFlows/0313cc37-d421-421d-857b-87804d61e33e
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",
"displayName": "New user flow description",
"priority": 200
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new ExternalUsersSelfServiceSignUpEventsFlow
{
OdataType = "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",
DisplayName = "New user flow description",
Priority = 200,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Identity.AuthenticationEventsFlows["{authenticationEventsFlow-id}"].PatchAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta identity authentication-events-flows patch --authentication-events-flow-id {authenticationEventsFlow-id} --body '{\
"@odata.type": "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",\
"displayName": "New user flow description",\
"priority": 200\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewAuthenticationEventsFlow()
displayName := "New user flow description"
requestBody.SetDisplayName(&displayName)
priority := int32(200)
requestBody.SetPriority(&priority)
authenticationEventsFlows, err := graphClient.Identity().AuthenticationEventsFlows().ByAuthenticationEventsFlowId("authenticationEventsFlow-id").Patch(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ExternalUsersSelfServiceSignUpEventsFlow authenticationEventsFlow = new ExternalUsersSelfServiceSignUpEventsFlow();
authenticationEventsFlow.setOdataType("#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow");
authenticationEventsFlow.setDisplayName("New user flow description");
authenticationEventsFlow.setPriority(200);
AuthenticationEventsFlow result = graphClient.identity().authenticationEventsFlows().byAuthenticationEventsFlowId("{authenticationEventsFlow-id}").patch(authenticationEventsFlow);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const authenticationEventsFlow = {
'@odata.type': '#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow',
displayName: 'New user flow description',
priority: 200
};
await client.api('/identity/authenticationEventsFlows/0313cc37-d421-421d-857b-87804d61e33e')
.version('beta')
.update(authenticationEventsFlow);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\ExternalUsersSelfServiceSignUpEventsFlow;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExternalUsersSelfServiceSignUpEventsFlow();
$requestBody->setOdataType('#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow');
$requestBody->setDisplayName('New user flow description');
$requestBody->setPriority(200);
$result = $graphServiceClient->identity()->authenticationEventsFlows()->byAuthenticationEventsFlowId('authenticationEventsFlow-id')->patch($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.Beta.Identity.SignIns
$params = @{
"@odata.type" = "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow"
displayName = "New user flow description"
priority = 200
}
Update-MgBetaIdentityAuthenticationEventFlow -AuthenticationEventsFlowId $authenticationEventsFlowId -BodyParameter $params
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
from msgraph import GraphServiceClient
from msgraph.generated.models.external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow
graph_client = GraphServiceClient(credentials, scopes)
request_body = ExternalUsersSelfServiceSignUpEventsFlow(
odata_type = "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",
display_name = "New user flow description",
priority = 200,
)
result = await graph_client.identity.authentication_events_flows.by_authentication_events_flow_id('authenticationEventsFlow-id').patch(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Response
The following example shows the response.
HTTP/1.1 204 No Content
Example 2: Update the onAttributeCollection event of a self-service sign up user flow
Add city (built-in attribute) as an attribute to be collected during the attribute collection step of a self-service sign up user flow. You must specify in the inputs object all attributes that you want to retain, otherwise they are removed from the user flow.
Request
PATCH https://graph.microsoft.com/beta/identity/authenticationEventsFlows/0313cc37-d421-421d-857b-87804d61e33e
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",
"onAttributeCollection": {
"@odata.type": "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp",
"attributeCollectionPage": {
"customStringsFileId": null,
"views": [
{
"title": null,
"description": null,
"inputs": [
{
"attribute": "email",
"label": "Email Address",
"inputType": "text",
"defaultValue": null,
"hidden": true,
"editable": false,
"writeToDirectory": true,
"required": true,
"validationRegEx": "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$",
"options": []
},
{
"attribute": "displayName",
"label": "Display Name",
"inputType": "text",
"defaultValue": null,
"hidden": false,
"editable": true,
"writeToDirectory": true,
"required": false,
"validationRegEx": "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",
"options": []
},
{
"attribute": "city",
"label": "City",
"inputType": "text",
"defaultValue": null,
"hidden": false,
"editable": true,
"writeToDirectory": true,
"required": false,
"validationRegEx": "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",
"options": []
},
{
"attribute": "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor",
"label": "Favorite color",
"inputType": "text",
"defaultValue": null,
"hidden": false,
"editable": true,
"writeToDirectory": true,
"required": false,
"validationRegEx": "^.*",
"options": []
}
]
}
]
}
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new ExternalUsersSelfServiceSignUpEventsFlow
{
OdataType = "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",
OnAttributeCollection = new OnAttributeCollectionExternalUsersSelfServiceSignUp
{
OdataType = "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp",
AttributeCollectionPage = new AuthenticationAttributeCollectionPage
{
CustomStringsFileId = null,
Views = new List<AuthenticationAttributeCollectionPageViewConfiguration>
{
new AuthenticationAttributeCollectionPageViewConfiguration
{
Title = null,
Description = null,
Inputs = new List<AuthenticationAttributeCollectionInputConfiguration>
{
new AuthenticationAttributeCollectionInputConfiguration
{
Attribute = "email",
Label = "Email Address",
InputType = AuthenticationAttributeCollectionInputType.Text,
DefaultValue = null,
Hidden = true,
Editable = false,
WriteToDirectory = true,
Required = true,
ValidationRegEx = "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$",
Options = new List<AuthenticationAttributeCollectionOptionConfiguration>
{
},
},
new AuthenticationAttributeCollectionInputConfiguration
{
Attribute = "displayName",
Label = "Display Name",
InputType = AuthenticationAttributeCollectionInputType.Text,
DefaultValue = null,
Hidden = false,
Editable = true,
WriteToDirectory = true,
Required = false,
ValidationRegEx = "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",
Options = new List<AuthenticationAttributeCollectionOptionConfiguration>
{
},
},
new AuthenticationAttributeCollectionInputConfiguration
{
Attribute = "city",
Label = "City",
InputType = AuthenticationAttributeCollectionInputType.Text,
DefaultValue = null,
Hidden = false,
Editable = true,
WriteToDirectory = true,
Required = false,
ValidationRegEx = "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",
Options = new List<AuthenticationAttributeCollectionOptionConfiguration>
{
},
},
new AuthenticationAttributeCollectionInputConfiguration
{
Attribute = "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor",
Label = "Favorite color",
InputType = AuthenticationAttributeCollectionInputType.Text,
DefaultValue = null,
Hidden = false,
Editable = true,
WriteToDirectory = true,
Required = false,
ValidationRegEx = "^.*",
Options = new List<AuthenticationAttributeCollectionOptionConfiguration>
{
},
},
},
},
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Identity.AuthenticationEventsFlows["{authenticationEventsFlow-id}"].PatchAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta identity authentication-events-flows patch --authentication-events-flow-id {authenticationEventsFlow-id} --body '{\
"@odata.type": "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",\
"onAttributeCollection": {\
"@odata.type": "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp",\
"attributeCollectionPage": {\
"customStringsFileId": null,\
"views": [\
{\
"title": null,\
"description": null,\
"inputs": [\
{\
"attribute": "email",\
"label": "Email Address",\
"inputType": "text",\
"defaultValue": null,\
"hidden": true,\
"editable": false,\
"writeToDirectory": true,\
"required": true,\
"validationRegEx": "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$",\
"options": []\
},\
{\
"attribute": "displayName",\
"label": "Display Name",\
"inputType": "text",\
"defaultValue": null,\
"hidden": false,\
"editable": true,\
"writeToDirectory": true,\
"required": false,\
"validationRegEx": "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",\
"options": []\
},\
{\
"attribute": "city",\
"label": "City",\
"inputType": "text",\
"defaultValue": null,\
"hidden": false,\
"editable": true,\
"writeToDirectory": true,\
"required": false,\
"validationRegEx": "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",\
"options": []\
},\
{\
"attribute": "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor",\
"label": "Favorite color",\
"inputType": "text",\
"defaultValue": null,\
"hidden": false,\
"editable": true,\
"writeToDirectory": true,\
"required": false,\
"validationRegEx": "^.*",\
"options": []\
}\
]\
}\
]\
}\
}\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewAuthenticationEventsFlow()
onAttributeCollection := graphmodels.NewOnAttributeCollectionExternalUsersSelfServiceSignUp()
attributeCollectionPage := graphmodels.NewAuthenticationAttributeCollectionPage()
customStringsFileId := null
attributeCollectionPage.SetCustomStringsFileId(&customStringsFileId)
authenticationAttributeCollectionPageViewConfiguration := graphmodels.NewAuthenticationAttributeCollectionPageViewConfiguration()
title := null
authenticationAttributeCollectionPageViewConfiguration.SetTitle(&title)
description := null
authenticationAttributeCollectionPageViewConfiguration.SetDescription(&description)
authenticationAttributeCollectionInputConfiguration := graphmodels.NewAuthenticationAttributeCollectionInputConfiguration()
attribute := "email"
authenticationAttributeCollectionInputConfiguration.SetAttribute(&attribute)
label := "Email Address"
authenticationAttributeCollectionInputConfiguration.SetLabel(&label)
inputType := graphmodels.TEXT_AUTHENTICATIONATTRIBUTECOLLECTIONINPUTTYPE
authenticationAttributeCollectionInputConfiguration.SetInputType(&inputType)
defaultValue := null
authenticationAttributeCollectionInputConfiguration.SetDefaultValue(&defaultValue)
hidden := true
authenticationAttributeCollectionInputConfiguration.SetHidden(&hidden)
editable := false
authenticationAttributeCollectionInputConfiguration.SetEditable(&editable)
writeToDirectory := true
authenticationAttributeCollectionInputConfiguration.SetWriteToDirectory(&writeToDirectory)
required := true
authenticationAttributeCollectionInputConfiguration.SetRequired(&required)
validationRegEx := "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$"
authenticationAttributeCollectionInputConfiguration.SetValidationRegEx(&validationRegEx)
options := []graphmodels.AuthenticationAttributeCollectionOptionConfigurationable {
}
authenticationAttributeCollectionInputConfiguration.SetOptions(options)
authenticationAttributeCollectionInputConfiguration1 := graphmodels.NewAuthenticationAttributeCollectionInputConfiguration()
attribute := "displayName"
authenticationAttributeCollectionInputConfiguration1.SetAttribute(&attribute)
label := "Display Name"
authenticationAttributeCollectionInputConfiguration1.SetLabel(&label)
inputType := graphmodels.TEXT_AUTHENTICATIONATTRIBUTECOLLECTIONINPUTTYPE
authenticationAttributeCollectionInputConfiguration1.SetInputType(&inputType)
defaultValue := null
authenticationAttributeCollectionInputConfiguration1.SetDefaultValue(&defaultValue)
hidden := false
authenticationAttributeCollectionInputConfiguration1.SetHidden(&hidden)
editable := true
authenticationAttributeCollectionInputConfiguration1.SetEditable(&editable)
writeToDirectory := true
authenticationAttributeCollectionInputConfiguration1.SetWriteToDirectory(&writeToDirectory)
required := false
authenticationAttributeCollectionInputConfiguration1.SetRequired(&required)
validationRegEx := "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$"
authenticationAttributeCollectionInputConfiguration1.SetValidationRegEx(&validationRegEx)
options := []graphmodels.AuthenticationAttributeCollectionOptionConfigurationable {
}
authenticationAttributeCollectionInputConfiguration1.SetOptions(options)
authenticationAttributeCollectionInputConfiguration2 := graphmodels.NewAuthenticationAttributeCollectionInputConfiguration()
attribute := "city"
authenticationAttributeCollectionInputConfiguration2.SetAttribute(&attribute)
label := "City"
authenticationAttributeCollectionInputConfiguration2.SetLabel(&label)
inputType := graphmodels.TEXT_AUTHENTICATIONATTRIBUTECOLLECTIONINPUTTYPE
authenticationAttributeCollectionInputConfiguration2.SetInputType(&inputType)
defaultValue := null
authenticationAttributeCollectionInputConfiguration2.SetDefaultValue(&defaultValue)
hidden := false
authenticationAttributeCollectionInputConfiguration2.SetHidden(&hidden)
editable := true
authenticationAttributeCollectionInputConfiguration2.SetEditable(&editable)
writeToDirectory := true
authenticationAttributeCollectionInputConfiguration2.SetWriteToDirectory(&writeToDirectory)
required := false
authenticationAttributeCollectionInputConfiguration2.SetRequired(&required)
validationRegEx := "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$"
authenticationAttributeCollectionInputConfiguration2.SetValidationRegEx(&validationRegEx)
options := []graphmodels.AuthenticationAttributeCollectionOptionConfigurationable {
}
authenticationAttributeCollectionInputConfiguration2.SetOptions(options)
authenticationAttributeCollectionInputConfiguration3 := graphmodels.NewAuthenticationAttributeCollectionInputConfiguration()
attribute := "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor"
authenticationAttributeCollectionInputConfiguration3.SetAttribute(&attribute)
label := "Favorite color"
authenticationAttributeCollectionInputConfiguration3.SetLabel(&label)
inputType := graphmodels.TEXT_AUTHENTICATIONATTRIBUTECOLLECTIONINPUTTYPE
authenticationAttributeCollectionInputConfiguration3.SetInputType(&inputType)
defaultValue := null
authenticationAttributeCollectionInputConfiguration3.SetDefaultValue(&defaultValue)
hidden := false
authenticationAttributeCollectionInputConfiguration3.SetHidden(&hidden)
editable := true
authenticationAttributeCollectionInputConfiguration3.SetEditable(&editable)
writeToDirectory := true
authenticationAttributeCollectionInputConfiguration3.SetWriteToDirectory(&writeToDirectory)
required := false
authenticationAttributeCollectionInputConfiguration3.SetRequired(&required)
validationRegEx := "^.*"
authenticationAttributeCollectionInputConfiguration3.SetValidationRegEx(&validationRegEx)
options := []graphmodels.AuthenticationAttributeCollectionOptionConfigurationable {
}
authenticationAttributeCollectionInputConfiguration3.SetOptions(options)
inputs := []graphmodels.AuthenticationAttributeCollectionInputConfigurationable {
authenticationAttributeCollectionInputConfiguration,
authenticationAttributeCollectionInputConfiguration1,
authenticationAttributeCollectionInputConfiguration2,
authenticationAttributeCollectionInputConfiguration3,
}
authenticationAttributeCollectionPageViewConfiguration.SetInputs(inputs)
views := []graphmodels.AuthenticationAttributeCollectionPageViewConfigurationable {
authenticationAttributeCollectionPageViewConfiguration,
}
attributeCollectionPage.SetViews(views)
onAttributeCollection.SetAttributeCollectionPage(attributeCollectionPage)
requestBody.SetOnAttributeCollection(onAttributeCollection)
authenticationEventsFlows, err := graphClient.Identity().AuthenticationEventsFlows().ByAuthenticationEventsFlowId("authenticationEventsFlow-id").Patch(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ExternalUsersSelfServiceSignUpEventsFlow authenticationEventsFlow = new ExternalUsersSelfServiceSignUpEventsFlow();
authenticationEventsFlow.setOdataType("#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow");
OnAttributeCollectionExternalUsersSelfServiceSignUp onAttributeCollection = new OnAttributeCollectionExternalUsersSelfServiceSignUp();
onAttributeCollection.setOdataType("#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp");
AuthenticationAttributeCollectionPage attributeCollectionPage = new AuthenticationAttributeCollectionPage();
attributeCollectionPage.setCustomStringsFileId(null);
LinkedList<AuthenticationAttributeCollectionPageViewConfiguration> views = new LinkedList<AuthenticationAttributeCollectionPageViewConfiguration>();
AuthenticationAttributeCollectionPageViewConfiguration authenticationAttributeCollectionPageViewConfiguration = new AuthenticationAttributeCollectionPageViewConfiguration();
authenticationAttributeCollectionPageViewConfiguration.setTitle(null);
authenticationAttributeCollectionPageViewConfiguration.setDescription(null);
LinkedList<AuthenticationAttributeCollectionInputConfiguration> inputs = new LinkedList<AuthenticationAttributeCollectionInputConfiguration>();
AuthenticationAttributeCollectionInputConfiguration authenticationAttributeCollectionInputConfiguration = new AuthenticationAttributeCollectionInputConfiguration();
authenticationAttributeCollectionInputConfiguration.setAttribute("email");
authenticationAttributeCollectionInputConfiguration.setLabel("Email Address");
authenticationAttributeCollectionInputConfiguration.setInputType(AuthenticationAttributeCollectionInputType.Text);
authenticationAttributeCollectionInputConfiguration.setDefaultValue(null);
authenticationAttributeCollectionInputConfiguration.setHidden(true);
authenticationAttributeCollectionInputConfiguration.setEditable(false);
authenticationAttributeCollectionInputConfiguration.setWriteToDirectory(true);
authenticationAttributeCollectionInputConfiguration.setRequired(true);
authenticationAttributeCollectionInputConfiguration.setValidationRegEx("^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$");
LinkedList<AuthenticationAttributeCollectionOptionConfiguration> options = new LinkedList<AuthenticationAttributeCollectionOptionConfiguration>();
authenticationAttributeCollectionInputConfiguration.setOptions(options);
inputs.add(authenticationAttributeCollectionInputConfiguration);
AuthenticationAttributeCollectionInputConfiguration authenticationAttributeCollectionInputConfiguration1 = new AuthenticationAttributeCollectionInputConfiguration();
authenticationAttributeCollectionInputConfiguration1.setAttribute("displayName");
authenticationAttributeCollectionInputConfiguration1.setLabel("Display Name");
authenticationAttributeCollectionInputConfiguration1.setInputType(AuthenticationAttributeCollectionInputType.Text);
authenticationAttributeCollectionInputConfiguration1.setDefaultValue(null);
authenticationAttributeCollectionInputConfiguration1.setHidden(false);
authenticationAttributeCollectionInputConfiguration1.setEditable(true);
authenticationAttributeCollectionInputConfiguration1.setWriteToDirectory(true);
authenticationAttributeCollectionInputConfiguration1.setRequired(false);
authenticationAttributeCollectionInputConfiguration1.setValidationRegEx("^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$");
LinkedList<AuthenticationAttributeCollectionOptionConfiguration> options1 = new LinkedList<AuthenticationAttributeCollectionOptionConfiguration>();
authenticationAttributeCollectionInputConfiguration1.setOptions(options1);
inputs.add(authenticationAttributeCollectionInputConfiguration1);
AuthenticationAttributeCollectionInputConfiguration authenticationAttributeCollectionInputConfiguration2 = new AuthenticationAttributeCollectionInputConfiguration();
authenticationAttributeCollectionInputConfiguration2.setAttribute("city");
authenticationAttributeCollectionInputConfiguration2.setLabel("City");
authenticationAttributeCollectionInputConfiguration2.setInputType(AuthenticationAttributeCollectionInputType.Text);
authenticationAttributeCollectionInputConfiguration2.setDefaultValue(null);
authenticationAttributeCollectionInputConfiguration2.setHidden(false);
authenticationAttributeCollectionInputConfiguration2.setEditable(true);
authenticationAttributeCollectionInputConfiguration2.setWriteToDirectory(true);
authenticationAttributeCollectionInputConfiguration2.setRequired(false);
authenticationAttributeCollectionInputConfiguration2.setValidationRegEx("^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$");
LinkedList<AuthenticationAttributeCollectionOptionConfiguration> options2 = new LinkedList<AuthenticationAttributeCollectionOptionConfiguration>();
authenticationAttributeCollectionInputConfiguration2.setOptions(options2);
inputs.add(authenticationAttributeCollectionInputConfiguration2);
AuthenticationAttributeCollectionInputConfiguration authenticationAttributeCollectionInputConfiguration3 = new AuthenticationAttributeCollectionInputConfiguration();
authenticationAttributeCollectionInputConfiguration3.setAttribute("extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor");
authenticationAttributeCollectionInputConfiguration3.setLabel("Favorite color");
authenticationAttributeCollectionInputConfiguration3.setInputType(AuthenticationAttributeCollectionInputType.Text);
authenticationAttributeCollectionInputConfiguration3.setDefaultValue(null);
authenticationAttributeCollectionInputConfiguration3.setHidden(false);
authenticationAttributeCollectionInputConfiguration3.setEditable(true);
authenticationAttributeCollectionInputConfiguration3.setWriteToDirectory(true);
authenticationAttributeCollectionInputConfiguration3.setRequired(false);
authenticationAttributeCollectionInputConfiguration3.setValidationRegEx("^.*");
LinkedList<AuthenticationAttributeCollectionOptionConfiguration> options3 = new LinkedList<AuthenticationAttributeCollectionOptionConfiguration>();
authenticationAttributeCollectionInputConfiguration3.setOptions(options3);
inputs.add(authenticationAttributeCollectionInputConfiguration3);
authenticationAttributeCollectionPageViewConfiguration.setInputs(inputs);
views.add(authenticationAttributeCollectionPageViewConfiguration);
attributeCollectionPage.setViews(views);
onAttributeCollection.setAttributeCollectionPage(attributeCollectionPage);
authenticationEventsFlow.setOnAttributeCollection(onAttributeCollection);
AuthenticationEventsFlow result = graphClient.identity().authenticationEventsFlows().byAuthenticationEventsFlowId("{authenticationEventsFlow-id}").patch(authenticationEventsFlow);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const authenticationEventsFlow = {
'@odata.type': '#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow',
onAttributeCollection: {
'@odata.type': '#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp',
attributeCollectionPage: {
customStringsFileId: null,
views: [
{
title: null,
description: null,
inputs: [
{
attribute: 'email',
label: 'Email Address',
inputType: 'text',
defaultValue: null,
hidden: true,
editable: false,
writeToDirectory: true,
required: true,
validationRegEx: '^[a-zA-Z0-9.!#$%&’\'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$',
options: []
},
{
attribute: 'displayName',
label: 'Display Name',
inputType: 'text',
defaultValue: null,
hidden: false,
editable: true,
writeToDirectory: true,
required: false,
validationRegEx: '^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$',
options: []
},
{
attribute: 'city',
label: 'City',
inputType: 'text',
defaultValue: null,
hidden: false,
editable: true,
writeToDirectory: true,
required: false,
validationRegEx: '^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$',
options: []
},
{
attribute: 'extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor',
label: 'Favorite color',
inputType: 'text',
defaultValue: null,
hidden: false,
editable: true,
writeToDirectory: true,
required: false,
validationRegEx: '^.*',
options: []
}
]
}
]
}
}
};
await client.api('/identity/authenticationEventsFlows/0313cc37-d421-421d-857b-87804d61e33e')
.version('beta')
.update(authenticationEventsFlow);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\ExternalUsersSelfServiceSignUpEventsFlow;
use Microsoft\Graph\Generated\Models\OnAttributeCollectionExternalUsersSelfServiceSignUp;
use Microsoft\Graph\Generated\Models\AuthenticationAttributeCollectionPage;
use Microsoft\Graph\Generated\Models\AuthenticationAttributeCollectionPageViewConfiguration;
use Microsoft\Graph\Generated\Models\AuthenticationAttributeCollectionInputConfiguration;
use Microsoft\Graph\Generated\Models\AuthenticationAttributeCollectionOptionConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExternalUsersSelfServiceSignUpEventsFlow();
$requestBody->setOdataType('#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow');
$onAttributeCollection = new OnAttributeCollectionExternalUsersSelfServiceSignUp();
$onAttributeCollection->setOdataType('#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp');
$onAttributeCollectionAttributeCollectionPage = new AuthenticationAttributeCollectionPage();
$onAttributeCollectionAttributeCollectionPage->setCustomStringsFileId(null);
$viewsAuthenticationAttributeCollectionPageViewConfiguration1 = new AuthenticationAttributeCollectionPageViewConfiguration();
$viewsAuthenticationAttributeCollectionPageViewConfiguration1->setTitle(null);
$viewsAuthenticationAttributeCollectionPageViewConfiguration1->setDescription(null);
$inputsAuthenticationAttributeCollectionInputConfiguration1 = new AuthenticationAttributeCollectionInputConfiguration();
$inputsAuthenticationAttributeCollectionInputConfiguration1->setAttribute('email');
$inputsAuthenticationAttributeCollectionInputConfiguration1->setLabel('Email Address');
$inputsAuthenticationAttributeCollectionInputConfiguration1->setInputType(new AuthenticationAttributeCollectionInputType('text'));
$inputsAuthenticationAttributeCollectionInputConfiguration1->setDefaultValue(null);
$inputsAuthenticationAttributeCollectionInputConfiguration1->setHidden(true);
$inputsAuthenticationAttributeCollectionInputConfiguration1->setEditable(false);
$inputsAuthenticationAttributeCollectionInputConfiguration1->setWriteToDirectory(true);
$inputsAuthenticationAttributeCollectionInputConfiguration1->setRequired(true);
$inputsAuthenticationAttributeCollectionInputConfiguration1->setValidationRegEx('^[a-zA-Z0-9.!#$%&’\'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$');
$inputsAuthenticationAttributeCollectionInputConfiguration1->setOptions([ ]);
$inputsArray []= $inputsAuthenticationAttributeCollectionInputConfiguration1;
$inputsAuthenticationAttributeCollectionInputConfiguration2 = new AuthenticationAttributeCollectionInputConfiguration();
$inputsAuthenticationAttributeCollectionInputConfiguration2->setAttribute('displayName');
$inputsAuthenticationAttributeCollectionInputConfiguration2->setLabel('Display Name');
$inputsAuthenticationAttributeCollectionInputConfiguration2->setInputType(new AuthenticationAttributeCollectionInputType('text'));
$inputsAuthenticationAttributeCollectionInputConfiguration2->setDefaultValue(null);
$inputsAuthenticationAttributeCollectionInputConfiguration2->setHidden(false);
$inputsAuthenticationAttributeCollectionInputConfiguration2->setEditable(true);
$inputsAuthenticationAttributeCollectionInputConfiguration2->setWriteToDirectory(true);
$inputsAuthenticationAttributeCollectionInputConfiguration2->setRequired(false);
$inputsAuthenticationAttributeCollectionInputConfiguration2->setValidationRegEx('^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$');
$inputsAuthenticationAttributeCollectionInputConfiguration2->setOptions([ ]);
$inputsArray []= $inputsAuthenticationAttributeCollectionInputConfiguration2;
$inputsAuthenticationAttributeCollectionInputConfiguration3 = new AuthenticationAttributeCollectionInputConfiguration();
$inputsAuthenticationAttributeCollectionInputConfiguration3->setAttribute('city');
$inputsAuthenticationAttributeCollectionInputConfiguration3->setLabel('City');
$inputsAuthenticationAttributeCollectionInputConfiguration3->setInputType(new AuthenticationAttributeCollectionInputType('text'));
$inputsAuthenticationAttributeCollectionInputConfiguration3->setDefaultValue(null);
$inputsAuthenticationAttributeCollectionInputConfiguration3->setHidden(false);
$inputsAuthenticationAttributeCollectionInputConfiguration3->setEditable(true);
$inputsAuthenticationAttributeCollectionInputConfiguration3->setWriteToDirectory(true);
$inputsAuthenticationAttributeCollectionInputConfiguration3->setRequired(false);
$inputsAuthenticationAttributeCollectionInputConfiguration3->setValidationRegEx('^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$');
$inputsAuthenticationAttributeCollectionInputConfiguration3->setOptions([ ]);
$inputsArray []= $inputsAuthenticationAttributeCollectionInputConfiguration3;
$inputsAuthenticationAttributeCollectionInputConfiguration4 = new AuthenticationAttributeCollectionInputConfiguration();
$inputsAuthenticationAttributeCollectionInputConfiguration4->setAttribute('extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor');
$inputsAuthenticationAttributeCollectionInputConfiguration4->setLabel('Favorite color');
$inputsAuthenticationAttributeCollectionInputConfiguration4->setInputType(new AuthenticationAttributeCollectionInputType('text'));
$inputsAuthenticationAttributeCollectionInputConfiguration4->setDefaultValue(null);
$inputsAuthenticationAttributeCollectionInputConfiguration4->setHidden(false);
$inputsAuthenticationAttributeCollectionInputConfiguration4->setEditable(true);
$inputsAuthenticationAttributeCollectionInputConfiguration4->setWriteToDirectory(true);
$inputsAuthenticationAttributeCollectionInputConfiguration4->setRequired(false);
$inputsAuthenticationAttributeCollectionInputConfiguration4->setValidationRegEx('^.*');
$inputsAuthenticationAttributeCollectionInputConfiguration4->setOptions([ ]);
$inputsArray []= $inputsAuthenticationAttributeCollectionInputConfiguration4;
$viewsAuthenticationAttributeCollectionPageViewConfiguration1->setInputs($inputsArray);
$viewsArray []= $viewsAuthenticationAttributeCollectionPageViewConfiguration1;
$onAttributeCollectionAttributeCollectionPage->setViews($viewsArray);
$onAttributeCollection->setAttributeCollectionPage($onAttributeCollectionAttributeCollectionPage);
$requestBody->setOnAttributeCollection($onAttributeCollection);
$result = $graphServiceClient->identity()->authenticationEventsFlows()->byAuthenticationEventsFlowId('authenticationEventsFlow-id')->patch($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.Beta.Identity.SignIns
$params = @{
"@odata.type" = "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow"
onAttributeCollection = @{
"@odata.type" = "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp"
attributeCollectionPage = @{
customStringsFileId = $null
views = @(
@{
title = $null
description = $null
inputs = @(
@{
attribute = "email"
label = "Email Address"
inputType = "text"
defaultValue = $null
hidden = $true
editable = $false
writeToDirectory = $true
required = $true
validationRegEx = "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$"
options = @(
)
}
@{
attribute = "displayName"
label = "Display Name"
inputType = "text"
defaultValue = $null
hidden = $false
editable = $true
writeToDirectory = $true
required = $false
validationRegEx = "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$"
options = @(
)
}
@{
attribute = "city"
label = "City"
inputType = "text"
defaultValue = $null
hidden = $false
editable = $true
writeToDirectory = $true
required = $false
validationRegEx = "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$"
options = @(
)
}
@{
attribute = "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor"
label = "Favorite color"
inputType = "text"
defaultValue = $null
hidden = $false
editable = $true
writeToDirectory = $true
required = $false
validationRegEx = "^.*"
options = @(
)
}
)
}
)
}
}
}
Update-MgBetaIdentityAuthenticationEventFlow -AuthenticationEventsFlowId $authenticationEventsFlowId -BodyParameter $params
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
from msgraph import GraphServiceClient
from msgraph.generated.models.external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow
from msgraph.generated.models.on_attribute_collection_external_users_self_service_sign_up import OnAttributeCollectionExternalUsersSelfServiceSignUp
from msgraph.generated.models.authentication_attribute_collection_page import AuthenticationAttributeCollectionPage
from msgraph.generated.models.authentication_attribute_collection_page_view_configuration import AuthenticationAttributeCollectionPageViewConfiguration
from msgraph.generated.models.authentication_attribute_collection_input_configuration import AuthenticationAttributeCollectionInputConfiguration
from msgraph.generated.models.authentication_attribute_collection_option_configuration import AuthenticationAttributeCollectionOptionConfiguration
graph_client = GraphServiceClient(credentials, scopes)
request_body = ExternalUsersSelfServiceSignUpEventsFlow(
odata_type = "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",
on_attribute_collection = OnAttributeCollectionExternalUsersSelfServiceSignUp(
odata_type = "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp",
attribute_collection_page = AuthenticationAttributeCollectionPage(
custom_strings_file_id = None,
views = [
AuthenticationAttributeCollectionPageViewConfiguration(
title = None,
description = None,
inputs = [
AuthenticationAttributeCollectionInputConfiguration(
attribute = "email",
label = "Email Address",
input_type = AuthenticationAttributeCollectionInputType.Text,
default_value = None,
hidden = True,
editable = False,
write_to_directory = True,
required = True,
validation_reg_ex = "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$",
options = [
],
),
AuthenticationAttributeCollectionInputConfiguration(
attribute = "displayName",
label = "Display Name",
input_type = AuthenticationAttributeCollectionInputType.Text,
default_value = None,
hidden = False,
editable = True,
write_to_directory = True,
required = False,
validation_reg_ex = "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",
options = [
],
),
AuthenticationAttributeCollectionInputConfiguration(
attribute = "city",
label = "City",
input_type = AuthenticationAttributeCollectionInputType.Text,
default_value = None,
hidden = False,
editable = True,
write_to_directory = True,
required = False,
validation_reg_ex = "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",
options = [
],
),
AuthenticationAttributeCollectionInputConfiguration(
attribute = "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor",
label = "Favorite color",
input_type = AuthenticationAttributeCollectionInputType.Text,
default_value = None,
hidden = False,
editable = True,
write_to_directory = True,
required = False,
validation_reg_ex = "^.*",
options = [
],
),
],
),
],
),
),
)
result = await graph_client.identity.authentication_events_flows.by_authentication_events_flow_id('authenticationEventsFlow-id').patch(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Response
The following example shows the response.
HTTP/1.1 204 No Content
Example 3: Remove an attribute collected during a self-service sign up user flow
Remove city as an attribute to be collected during the attribute collection step of a self-service sign up user flow. By excluding the city attribute from the request body, the attribute is removed from the user flow.
Request
PATCH https://graph.microsoft.com/beta/identity/authenticationEventsFlows/0313cc37-d421-421d-857b-87804d61e33e
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",
"onAttributeCollection": {
"@odata.type": "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp",
"attributeCollectionPage": {
"customStringsFileId": null,
"views": [
{
"title": null,
"description": null,
"inputs": [
{
"attribute": "email",
"label": "Email Address",
"inputType": "text",
"defaultValue": null,
"hidden": true,
"editable": false,
"writeToDirectory": true,
"required": true,
"validationRegEx": "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$",
"options": []
},
{
"attribute": "displayName",
"label": "Display Name",
"inputType": "text",
"defaultValue": null,
"hidden": false,
"editable": true,
"writeToDirectory": true,
"required": false,
"validationRegEx": "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",
"options": []
},
{
"attribute": "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor",
"label": "Favorite color",
"inputType": "text",
"defaultValue": null,
"hidden": false,
"editable": true,
"writeToDirectory": true,
"required": false,
"validationRegEx": "^.*",
"options": []
}
]
}
]
}
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new ExternalUsersSelfServiceSignUpEventsFlow
{
OdataType = "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",
OnAttributeCollection = new OnAttributeCollectionExternalUsersSelfServiceSignUp
{
OdataType = "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp",
AttributeCollectionPage = new AuthenticationAttributeCollectionPage
{
CustomStringsFileId = null,
Views = new List<AuthenticationAttributeCollectionPageViewConfiguration>
{
new AuthenticationAttributeCollectionPageViewConfiguration
{
Title = null,
Description = null,
Inputs = new List<AuthenticationAttributeCollectionInputConfiguration>
{
new AuthenticationAttributeCollectionInputConfiguration
{
Attribute = "email",
Label = "Email Address",
InputType = AuthenticationAttributeCollectionInputType.Text,
DefaultValue = null,
Hidden = true,
Editable = false,
WriteToDirectory = true,
Required = true,
ValidationRegEx = "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$",
Options = new List<AuthenticationAttributeCollectionOptionConfiguration>
{
},
},
new AuthenticationAttributeCollectionInputConfiguration
{
Attribute = "displayName",
Label = "Display Name",
InputType = AuthenticationAttributeCollectionInputType.Text,
DefaultValue = null,
Hidden = false,
Editable = true,
WriteToDirectory = true,
Required = false,
ValidationRegEx = "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",
Options = new List<AuthenticationAttributeCollectionOptionConfiguration>
{
},
},
new AuthenticationAttributeCollectionInputConfiguration
{
Attribute = "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor",
Label = "Favorite color",
InputType = AuthenticationAttributeCollectionInputType.Text,
DefaultValue = null,
Hidden = false,
Editable = true,
WriteToDirectory = true,
Required = false,
ValidationRegEx = "^.*",
Options = new List<AuthenticationAttributeCollectionOptionConfiguration>
{
},
},
},
},
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Identity.AuthenticationEventsFlows["{authenticationEventsFlow-id}"].PatchAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta identity authentication-events-flows patch --authentication-events-flow-id {authenticationEventsFlow-id} --body '{\
"@odata.type": "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",\
"onAttributeCollection": {\
"@odata.type": "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp",\
"attributeCollectionPage": {\
"customStringsFileId": null,\
"views": [\
{\
"title": null,\
"description": null,\
"inputs": [\
{\
"attribute": "email",\
"label": "Email Address",\
"inputType": "text",\
"defaultValue": null,\
"hidden": true,\
"editable": false,\
"writeToDirectory": true,\
"required": true,\
"validationRegEx": "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$",\
"options": []\
},\
{\
"attribute": "displayName",\
"label": "Display Name",\
"inputType": "text",\
"defaultValue": null,\
"hidden": false,\
"editable": true,\
"writeToDirectory": true,\
"required": false,\
"validationRegEx": "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",\
"options": []\
},\
{\
"attribute": "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor",\
"label": "Favorite color",\
"inputType": "text",\
"defaultValue": null,\
"hidden": false,\
"editable": true,\
"writeToDirectory": true,\
"required": false,\
"validationRegEx": "^.*",\
"options": []\
}\
]\
}\
]\
}\
}\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewAuthenticationEventsFlow()
onAttributeCollection := graphmodels.NewOnAttributeCollectionExternalUsersSelfServiceSignUp()
attributeCollectionPage := graphmodels.NewAuthenticationAttributeCollectionPage()
customStringsFileId := null
attributeCollectionPage.SetCustomStringsFileId(&customStringsFileId)
authenticationAttributeCollectionPageViewConfiguration := graphmodels.NewAuthenticationAttributeCollectionPageViewConfiguration()
title := null
authenticationAttributeCollectionPageViewConfiguration.SetTitle(&title)
description := null
authenticationAttributeCollectionPageViewConfiguration.SetDescription(&description)
authenticationAttributeCollectionInputConfiguration := graphmodels.NewAuthenticationAttributeCollectionInputConfiguration()
attribute := "email"
authenticationAttributeCollectionInputConfiguration.SetAttribute(&attribute)
label := "Email Address"
authenticationAttributeCollectionInputConfiguration.SetLabel(&label)
inputType := graphmodels.TEXT_AUTHENTICATIONATTRIBUTECOLLECTIONINPUTTYPE
authenticationAttributeCollectionInputConfiguration.SetInputType(&inputType)
defaultValue := null
authenticationAttributeCollectionInputConfiguration.SetDefaultValue(&defaultValue)
hidden := true
authenticationAttributeCollectionInputConfiguration.SetHidden(&hidden)
editable := false
authenticationAttributeCollectionInputConfiguration.SetEditable(&editable)
writeToDirectory := true
authenticationAttributeCollectionInputConfiguration.SetWriteToDirectory(&writeToDirectory)
required := true
authenticationAttributeCollectionInputConfiguration.SetRequired(&required)
validationRegEx := "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$"
authenticationAttributeCollectionInputConfiguration.SetValidationRegEx(&validationRegEx)
options := []graphmodels.AuthenticationAttributeCollectionOptionConfigurationable {
}
authenticationAttributeCollectionInputConfiguration.SetOptions(options)
authenticationAttributeCollectionInputConfiguration1 := graphmodels.NewAuthenticationAttributeCollectionInputConfiguration()
attribute := "displayName"
authenticationAttributeCollectionInputConfiguration1.SetAttribute(&attribute)
label := "Display Name"
authenticationAttributeCollectionInputConfiguration1.SetLabel(&label)
inputType := graphmodels.TEXT_AUTHENTICATIONATTRIBUTECOLLECTIONINPUTTYPE
authenticationAttributeCollectionInputConfiguration1.SetInputType(&inputType)
defaultValue := null
authenticationAttributeCollectionInputConfiguration1.SetDefaultValue(&defaultValue)
hidden := false
authenticationAttributeCollectionInputConfiguration1.SetHidden(&hidden)
editable := true
authenticationAttributeCollectionInputConfiguration1.SetEditable(&editable)
writeToDirectory := true
authenticationAttributeCollectionInputConfiguration1.SetWriteToDirectory(&writeToDirectory)
required := false
authenticationAttributeCollectionInputConfiguration1.SetRequired(&required)
validationRegEx := "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$"
authenticationAttributeCollectionInputConfiguration1.SetValidationRegEx(&validationRegEx)
options := []graphmodels.AuthenticationAttributeCollectionOptionConfigurationable {
}
authenticationAttributeCollectionInputConfiguration1.SetOptions(options)
authenticationAttributeCollectionInputConfiguration2 := graphmodels.NewAuthenticationAttributeCollectionInputConfiguration()
attribute := "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor"
authenticationAttributeCollectionInputConfiguration2.SetAttribute(&attribute)
label := "Favorite color"
authenticationAttributeCollectionInputConfiguration2.SetLabel(&label)
inputType := graphmodels.TEXT_AUTHENTICATIONATTRIBUTECOLLECTIONINPUTTYPE
authenticationAttributeCollectionInputConfiguration2.SetInputType(&inputType)
defaultValue := null
authenticationAttributeCollectionInputConfiguration2.SetDefaultValue(&defaultValue)
hidden := false
authenticationAttributeCollectionInputConfiguration2.SetHidden(&hidden)
editable := true
authenticationAttributeCollectionInputConfiguration2.SetEditable(&editable)
writeToDirectory := true
authenticationAttributeCollectionInputConfiguration2.SetWriteToDirectory(&writeToDirectory)
required := false
authenticationAttributeCollectionInputConfiguration2.SetRequired(&required)
validationRegEx := "^.*"
authenticationAttributeCollectionInputConfiguration2.SetValidationRegEx(&validationRegEx)
options := []graphmodels.AuthenticationAttributeCollectionOptionConfigurationable {
}
authenticationAttributeCollectionInputConfiguration2.SetOptions(options)
inputs := []graphmodels.AuthenticationAttributeCollectionInputConfigurationable {
authenticationAttributeCollectionInputConfiguration,
authenticationAttributeCollectionInputConfiguration1,
authenticationAttributeCollectionInputConfiguration2,
}
authenticationAttributeCollectionPageViewConfiguration.SetInputs(inputs)
views := []graphmodels.AuthenticationAttributeCollectionPageViewConfigurationable {
authenticationAttributeCollectionPageViewConfiguration,
}
attributeCollectionPage.SetViews(views)
onAttributeCollection.SetAttributeCollectionPage(attributeCollectionPage)
requestBody.SetOnAttributeCollection(onAttributeCollection)
authenticationEventsFlows, err := graphClient.Identity().AuthenticationEventsFlows().ByAuthenticationEventsFlowId("authenticationEventsFlow-id").Patch(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ExternalUsersSelfServiceSignUpEventsFlow authenticationEventsFlow = new ExternalUsersSelfServiceSignUpEventsFlow();
authenticationEventsFlow.setOdataType("#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow");
OnAttributeCollectionExternalUsersSelfServiceSignUp onAttributeCollection = new OnAttributeCollectionExternalUsersSelfServiceSignUp();
onAttributeCollection.setOdataType("#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp");
AuthenticationAttributeCollectionPage attributeCollectionPage = new AuthenticationAttributeCollectionPage();
attributeCollectionPage.setCustomStringsFileId(null);
LinkedList<AuthenticationAttributeCollectionPageViewConfiguration> views = new LinkedList<AuthenticationAttributeCollectionPageViewConfiguration>();
AuthenticationAttributeCollectionPageViewConfiguration authenticationAttributeCollectionPageViewConfiguration = new AuthenticationAttributeCollectionPageViewConfiguration();
authenticationAttributeCollectionPageViewConfiguration.setTitle(null);
authenticationAttributeCollectionPageViewConfiguration.setDescription(null);
LinkedList<AuthenticationAttributeCollectionInputConfiguration> inputs = new LinkedList<AuthenticationAttributeCollectionInputConfiguration>();
AuthenticationAttributeCollectionInputConfiguration authenticationAttributeCollectionInputConfiguration = new AuthenticationAttributeCollectionInputConfiguration();
authenticationAttributeCollectionInputConfiguration.setAttribute("email");
authenticationAttributeCollectionInputConfiguration.setLabel("Email Address");
authenticationAttributeCollectionInputConfiguration.setInputType(AuthenticationAttributeCollectionInputType.Text);
authenticationAttributeCollectionInputConfiguration.setDefaultValue(null);
authenticationAttributeCollectionInputConfiguration.setHidden(true);
authenticationAttributeCollectionInputConfiguration.setEditable(false);
authenticationAttributeCollectionInputConfiguration.setWriteToDirectory(true);
authenticationAttributeCollectionInputConfiguration.setRequired(true);
authenticationAttributeCollectionInputConfiguration.setValidationRegEx("^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$");
LinkedList<AuthenticationAttributeCollectionOptionConfiguration> options = new LinkedList<AuthenticationAttributeCollectionOptionConfiguration>();
authenticationAttributeCollectionInputConfiguration.setOptions(options);
inputs.add(authenticationAttributeCollectionInputConfiguration);
AuthenticationAttributeCollectionInputConfiguration authenticationAttributeCollectionInputConfiguration1 = new AuthenticationAttributeCollectionInputConfiguration();
authenticationAttributeCollectionInputConfiguration1.setAttribute("displayName");
authenticationAttributeCollectionInputConfiguration1.setLabel("Display Name");
authenticationAttributeCollectionInputConfiguration1.setInputType(AuthenticationAttributeCollectionInputType.Text);
authenticationAttributeCollectionInputConfiguration1.setDefaultValue(null);
authenticationAttributeCollectionInputConfiguration1.setHidden(false);
authenticationAttributeCollectionInputConfiguration1.setEditable(true);
authenticationAttributeCollectionInputConfiguration1.setWriteToDirectory(true);
authenticationAttributeCollectionInputConfiguration1.setRequired(false);
authenticationAttributeCollectionInputConfiguration1.setValidationRegEx("^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$");
LinkedList<AuthenticationAttributeCollectionOptionConfiguration> options1 = new LinkedList<AuthenticationAttributeCollectionOptionConfiguration>();
authenticationAttributeCollectionInputConfiguration1.setOptions(options1);
inputs.add(authenticationAttributeCollectionInputConfiguration1);
AuthenticationAttributeCollectionInputConfiguration authenticationAttributeCollectionInputConfiguration2 = new AuthenticationAttributeCollectionInputConfiguration();
authenticationAttributeCollectionInputConfiguration2.setAttribute("extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor");
authenticationAttributeCollectionInputConfiguration2.setLabel("Favorite color");
authenticationAttributeCollectionInputConfiguration2.setInputType(AuthenticationAttributeCollectionInputType.Text);
authenticationAttributeCollectionInputConfiguration2.setDefaultValue(null);
authenticationAttributeCollectionInputConfiguration2.setHidden(false);
authenticationAttributeCollectionInputConfiguration2.setEditable(true);
authenticationAttributeCollectionInputConfiguration2.setWriteToDirectory(true);
authenticationAttributeCollectionInputConfiguration2.setRequired(false);
authenticationAttributeCollectionInputConfiguration2.setValidationRegEx("^.*");
LinkedList<AuthenticationAttributeCollectionOptionConfiguration> options2 = new LinkedList<AuthenticationAttributeCollectionOptionConfiguration>();
authenticationAttributeCollectionInputConfiguration2.setOptions(options2);
inputs.add(authenticationAttributeCollectionInputConfiguration2);
authenticationAttributeCollectionPageViewConfiguration.setInputs(inputs);
views.add(authenticationAttributeCollectionPageViewConfiguration);
attributeCollectionPage.setViews(views);
onAttributeCollection.setAttributeCollectionPage(attributeCollectionPage);
authenticationEventsFlow.setOnAttributeCollection(onAttributeCollection);
AuthenticationEventsFlow result = graphClient.identity().authenticationEventsFlows().byAuthenticationEventsFlowId("{authenticationEventsFlow-id}").patch(authenticationEventsFlow);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const authenticationEventsFlow = {
'@odata.type': '#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow',
onAttributeCollection: {
'@odata.type': '#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp',
attributeCollectionPage: {
customStringsFileId: null,
views: [
{
title: null,
description: null,
inputs: [
{
attribute: 'email',
label: 'Email Address',
inputType: 'text',
defaultValue: null,
hidden: true,
editable: false,
writeToDirectory: true,
required: true,
validationRegEx: '^[a-zA-Z0-9.!#$%&’\'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$',
options: []
},
{
attribute: 'displayName',
label: 'Display Name',
inputType: 'text',
defaultValue: null,
hidden: false,
editable: true,
writeToDirectory: true,
required: false,
validationRegEx: '^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$',
options: []
},
{
attribute: 'extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor',
label: 'Favorite color',
inputType: 'text',
defaultValue: null,
hidden: false,
editable: true,
writeToDirectory: true,
required: false,
validationRegEx: '^.*',
options: []
}
]
}
]
}
}
};
await client.api('/identity/authenticationEventsFlows/0313cc37-d421-421d-857b-87804d61e33e')
.version('beta')
.update(authenticationEventsFlow);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\ExternalUsersSelfServiceSignUpEventsFlow;
use Microsoft\Graph\Generated\Models\OnAttributeCollectionExternalUsersSelfServiceSignUp;
use Microsoft\Graph\Generated\Models\AuthenticationAttributeCollectionPage;
use Microsoft\Graph\Generated\Models\AuthenticationAttributeCollectionPageViewConfiguration;
use Microsoft\Graph\Generated\Models\AuthenticationAttributeCollectionInputConfiguration;
use Microsoft\Graph\Generated\Models\AuthenticationAttributeCollectionOptionConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExternalUsersSelfServiceSignUpEventsFlow();
$requestBody->setOdataType('#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow');
$onAttributeCollection = new OnAttributeCollectionExternalUsersSelfServiceSignUp();
$onAttributeCollection->setOdataType('#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp');
$onAttributeCollectionAttributeCollectionPage = new AuthenticationAttributeCollectionPage();
$onAttributeCollectionAttributeCollectionPage->setCustomStringsFileId(null);
$viewsAuthenticationAttributeCollectionPageViewConfiguration1 = new AuthenticationAttributeCollectionPageViewConfiguration();
$viewsAuthenticationAttributeCollectionPageViewConfiguration1->setTitle(null);
$viewsAuthenticationAttributeCollectionPageViewConfiguration1->setDescription(null);
$inputsAuthenticationAttributeCollectionInputConfiguration1 = new AuthenticationAttributeCollectionInputConfiguration();
$inputsAuthenticationAttributeCollectionInputConfiguration1->setAttribute('email');
$inputsAuthenticationAttributeCollectionInputConfiguration1->setLabel('Email Address');
$inputsAuthenticationAttributeCollectionInputConfiguration1->setInputType(new AuthenticationAttributeCollectionInputType('text'));
$inputsAuthenticationAttributeCollectionInputConfiguration1->setDefaultValue(null);
$inputsAuthenticationAttributeCollectionInputConfiguration1->setHidden(true);
$inputsAuthenticationAttributeCollectionInputConfiguration1->setEditable(false);
$inputsAuthenticationAttributeCollectionInputConfiguration1->setWriteToDirectory(true);
$inputsAuthenticationAttributeCollectionInputConfiguration1->setRequired(true);
$inputsAuthenticationAttributeCollectionInputConfiguration1->setValidationRegEx('^[a-zA-Z0-9.!#$%&’\'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$');
$inputsAuthenticationAttributeCollectionInputConfiguration1->setOptions([ ]);
$inputsArray []= $inputsAuthenticationAttributeCollectionInputConfiguration1;
$inputsAuthenticationAttributeCollectionInputConfiguration2 = new AuthenticationAttributeCollectionInputConfiguration();
$inputsAuthenticationAttributeCollectionInputConfiguration2->setAttribute('displayName');
$inputsAuthenticationAttributeCollectionInputConfiguration2->setLabel('Display Name');
$inputsAuthenticationAttributeCollectionInputConfiguration2->setInputType(new AuthenticationAttributeCollectionInputType('text'));
$inputsAuthenticationAttributeCollectionInputConfiguration2->setDefaultValue(null);
$inputsAuthenticationAttributeCollectionInputConfiguration2->setHidden(false);
$inputsAuthenticationAttributeCollectionInputConfiguration2->setEditable(true);
$inputsAuthenticationAttributeCollectionInputConfiguration2->setWriteToDirectory(true);
$inputsAuthenticationAttributeCollectionInputConfiguration2->setRequired(false);
$inputsAuthenticationAttributeCollectionInputConfiguration2->setValidationRegEx('^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$');
$inputsAuthenticationAttributeCollectionInputConfiguration2->setOptions([ ]);
$inputsArray []= $inputsAuthenticationAttributeCollectionInputConfiguration2;
$inputsAuthenticationAttributeCollectionInputConfiguration3 = new AuthenticationAttributeCollectionInputConfiguration();
$inputsAuthenticationAttributeCollectionInputConfiguration3->setAttribute('extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor');
$inputsAuthenticationAttributeCollectionInputConfiguration3->setLabel('Favorite color');
$inputsAuthenticationAttributeCollectionInputConfiguration3->setInputType(new AuthenticationAttributeCollectionInputType('text'));
$inputsAuthenticationAttributeCollectionInputConfiguration3->setDefaultValue(null);
$inputsAuthenticationAttributeCollectionInputConfiguration3->setHidden(false);
$inputsAuthenticationAttributeCollectionInputConfiguration3->setEditable(true);
$inputsAuthenticationAttributeCollectionInputConfiguration3->setWriteToDirectory(true);
$inputsAuthenticationAttributeCollectionInputConfiguration3->setRequired(false);
$inputsAuthenticationAttributeCollectionInputConfiguration3->setValidationRegEx('^.*');
$inputsAuthenticationAttributeCollectionInputConfiguration3->setOptions([ ]);
$inputsArray []= $inputsAuthenticationAttributeCollectionInputConfiguration3;
$viewsAuthenticationAttributeCollectionPageViewConfiguration1->setInputs($inputsArray);
$viewsArray []= $viewsAuthenticationAttributeCollectionPageViewConfiguration1;
$onAttributeCollectionAttributeCollectionPage->setViews($viewsArray);
$onAttributeCollection->setAttributeCollectionPage($onAttributeCollectionAttributeCollectionPage);
$requestBody->setOnAttributeCollection($onAttributeCollection);
$result = $graphServiceClient->identity()->authenticationEventsFlows()->byAuthenticationEventsFlowId('authenticationEventsFlow-id')->patch($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.Beta.Identity.SignIns
$params = @{
"@odata.type" = "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow"
onAttributeCollection = @{
"@odata.type" = "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp"
attributeCollectionPage = @{
customStringsFileId = $null
views = @(
@{
title = $null
description = $null
inputs = @(
@{
attribute = "email"
label = "Email Address"
inputType = "text"
defaultValue = $null
hidden = $true
editable = $false
writeToDirectory = $true
required = $true
validationRegEx = "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$"
options = @(
)
}
@{
attribute = "displayName"
label = "Display Name"
inputType = "text"
defaultValue = $null
hidden = $false
editable = $true
writeToDirectory = $true
required = $false
validationRegEx = "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$"
options = @(
)
}
@{
attribute = "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor"
label = "Favorite color"
inputType = "text"
defaultValue = $null
hidden = $false
editable = $true
writeToDirectory = $true
required = $false
validationRegEx = "^.*"
options = @(
)
}
)
}
)
}
}
}
Update-MgBetaIdentityAuthenticationEventFlow -AuthenticationEventsFlowId $authenticationEventsFlowId -BodyParameter $params
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
from msgraph import GraphServiceClient
from msgraph.generated.models.external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow
from msgraph.generated.models.on_attribute_collection_external_users_self_service_sign_up import OnAttributeCollectionExternalUsersSelfServiceSignUp
from msgraph.generated.models.authentication_attribute_collection_page import AuthenticationAttributeCollectionPage
from msgraph.generated.models.authentication_attribute_collection_page_view_configuration import AuthenticationAttributeCollectionPageViewConfiguration
from msgraph.generated.models.authentication_attribute_collection_input_configuration import AuthenticationAttributeCollectionInputConfiguration
from msgraph.generated.models.authentication_attribute_collection_option_configuration import AuthenticationAttributeCollectionOptionConfiguration
graph_client = GraphServiceClient(credentials, scopes)
request_body = ExternalUsersSelfServiceSignUpEventsFlow(
odata_type = "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow",
on_attribute_collection = OnAttributeCollectionExternalUsersSelfServiceSignUp(
odata_type = "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp",
attribute_collection_page = AuthenticationAttributeCollectionPage(
custom_strings_file_id = None,
views = [
AuthenticationAttributeCollectionPageViewConfiguration(
title = None,
description = None,
inputs = [
AuthenticationAttributeCollectionInputConfiguration(
attribute = "email",
label = "Email Address",
input_type = AuthenticationAttributeCollectionInputType.Text,
default_value = None,
hidden = True,
editable = False,
write_to_directory = True,
required = True,
validation_reg_ex = "^[a-zA-Z0-9.!#$%&’'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$",
options = [
],
),
AuthenticationAttributeCollectionInputConfiguration(
attribute = "displayName",
label = "Display Name",
input_type = AuthenticationAttributeCollectionInputType.Text,
default_value = None,
hidden = False,
editable = True,
write_to_directory = True,
required = False,
validation_reg_ex = "^[a-zA-Z_][0-9a-zA-Z_ ]*[0-9a-zA-Z_]+$",
options = [
],
),
AuthenticationAttributeCollectionInputConfiguration(
attribute = "extension_6ea3bc85aec24b1c92ff4a117afb6621_Favoritecolor",
label = "Favorite color",
input_type = AuthenticationAttributeCollectionInputType.Text,
default_value = None,
hidden = False,
editable = True,
write_to_directory = True,
required = False,
validation_reg_ex = "^.*",
options = [
],
),
],
),
],
),
),
)
result = await graph_client.identity.authentication_events_flows.by_authentication_events_flow_id('authenticationEventsFlow-id').patch(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Response
The following example shows the response.
HTTP/1.1 204 No Content
Feedback
Was this page helpful?
Feedback
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.
Submit and view feedback for