Update identityUserFlowAttribute
Article
03/02/2023
3 contributors
Feedback
In this article
Namespace: microsoft.graph
Update the properties of a identityUserFlowAttribute object. Only custom user flow attributes can be updated.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions .
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
IdentityUserFlow.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
IdentityUserFlow.ReadWrite.All
The work or school account needs to belong to one of the following roles:
Global administrator
External Identity User Flow Attributes administrator
HTTP request
PATCH /identity/userFlowAttributes/{id}
Name
Description
Authorization
Bearer {token}. Required.
Content-Type
application/json. Required.
Request body
In the request body, provide a JSON object with one or more properties that need to be updated for an identityUserFlowAttribute object.
Note: Only the description property can be updated.
Property
Type
Description
description
String
The description of the user flow attribute. It is shown to the user at the time of sign up.
Response
If successful, this method returns a 204 No Content
response code. If unsuccessful, a 4xx
error will be returned with specific details.
Examples
Request
The following is an example of the request.
PATCH https://graph.microsoft.com/v1.0/identity/userFlowAttributes/extension_d09380e2b4c642b9a203fb816a04a7ad_Hobby
Content-type: application/json
{
"description": "Your new hobby"
}
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new IdentityUserFlowAttribute
{
Description = "Your new hobby",
};
var result = await graphClient.Identity.UserFlowAttributes["{identityUserFlowAttribute-id}"].PatchAsync(requestBody);
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-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewIdentityUserFlowAttribute()
description := "Your new hobby"
requestBody.SetDescription(&description)
result, err := graphClient.Identity().UserFlowAttributes().ByUserFlowAttributeId("identityUserFlowAttribute-id").Patch(context.Background(), requestBody, nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
IdentityUserFlowAttribute identityUserFlowAttribute = new IdentityUserFlowAttribute();
identityUserFlowAttribute.description = "Your new hobby";
graphClient.identity().userFlowAttributes("extension_d09380e2b4c642b9a203fb816a04a7ad_Hobby")
.buildRequest()
.patch(identityUserFlowAttribute);
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 identityUserFlowAttribute = {
description: 'Your new hobby'
};
await client.api('/identity/userFlowAttributes/extension_d09380e2b4c642b9a203fb816a04a7ad_Hobby')
.update(identityUserFlowAttribute);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new IdentityUserFlowAttribute();
$requestBody->setDescription('Your new hobby');
$result = $graphServiceClient->identity()->userFlowAttributes()->byUserFlowAttributeId('identityUserFlowAttribute-id')->patch($requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Import-Module Microsoft.Graph.Identity.SignIns
$params = @{
description = "Your new hobby"
}
Update-MgIdentityUserFlowAttribute -IdentityUserFlowAttributeId $identityUserFlowAttributeId -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Response
The following is an example of the response.
HTTP/1.1 204 No Content