Espacio de nombres: microsoft.graph
Actualice los valores de un objeto userFlowLanguagePage. Solo puede actualizar los valores de una overridesPage, que se usa para personalizar los valores que se muestran a un usuario durante un recorrido del usuario definido por un flujo de usuario.
Esta API está disponible en las siguientes implementaciones en la nube nacional.
| Servicio global |
Administración pública de EE. UU. |
Gobierno de EE. UU. L5 (DOD) |
China operado por 21Vianet |
| ✅ |
✅ |
✅ |
✅ |
Permissions
Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use uno o varios permisos con privilegios más altos solo si la aplicación lo requiere. Para obtener más información sobre los permisos delegados y de aplicación, consulte Tipos de permisos. Para obtener más información sobre estos permisos, consulte la referencia de permisos.
| Tipo de permiso |
Permisos con privilegios mínimos |
Permisos con privilegios más altos |
| Delegado (cuenta profesional o educativa) |
IdentityUserFlow.ReadWrite.All |
No disponible. |
| Delegado (cuenta personal de Microsoft) |
No admitida. |
No admitida. |
| Aplicación |
IdentityUserFlow.ReadWrite.All |
No disponible. |
Importante
Para el acceso delegado con cuentas profesionales o educativas, el usuario que ha iniciado sesión debe tener asignado un rol compatible de Microsoft Entra o un rol personalizado que conceda los permisos necesarios para esta operación.
Id. externa Administrador de flujo de usuario es el rol con privilegios mínimos admitido para esta operación.
Solicitud HTTP
Para hacer referencia al contenido del objeto, debe usar $value. De esta forma, se devuelve el contenido del objeto y se puede hacer referencia a él directamente.
PUT /identity/b2cUserFlows/{id}/languages/{id}/overridesPages/{id}/$value
PUT /identity/b2xUserFlows/{id}/languages/{id}/overridesPages/{id}/$value
| Nombre |
Descripción |
| Authorization |
{token} de portador. Obligatorio. Obtenga más información sobre autenticación y autorización. |
| Content-Type |
application/json. Obligatorio. |
Cuerpo de la solicitud
En el cuerpo de la solicitud, proporcione una representación JSON para los valores contenidos en un userFlowLanguagePage.
Respuesta
Si se ejecuta correctamente, este método devuelve un código de respuesta 204 No Content.
Ejemplos
Solicitud
En el ejemplo siguiente se muestra la solicitud.
PUT https://graph.microsoft.com/beta/identity/b2cUserFlows/B2C_1_Customer/languages/en/overridesPages/phonefactor/$value
Content-Type: application/json
{
"LocalizedStrings": [
{
"ElementType": "UxElement",
"ElementId": null,
"StringId": "alert_message",
"Override": true,
"Value": "Are you sure that you want to cancel your selection?"
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Identity.B2cUserFlows.Item.Languages.Item.OverridesPages.Item.Value;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new $valuePutRequestBody
{
AdditionalData = new Dictionary<string, object>
{
{
"LocalizedStrings" , new List<object>
{
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"elementType", new UntypedString("UxElement")
},
{
"elementId", new UntypedNull()
},
{
"stringId", new UntypedString("alert_message")
},
{
"override", new UntypedBoolean(true)
},
{
"value", new UntypedString("Are you sure that you want to cancel your selection?")
},
}),
}
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Identity.B2cUserFlows["{b2cIdentityUserFlow-id}"].Languages["{userFlowLanguageConfiguration-id}"].OverridesPages["{userFlowLanguagePage-id}"].Content.PutAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.identity.b2cuserflows.item.languages.item.overridespages.item.value.$valuePutRequestBody valuePutRequestBody = new com.microsoft.graph.beta.identity.b2cuserflows.item.languages.item.overridespages.item.value.$valuePutRequestBody();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
LinkedList<Object> localizedStrings = new LinkedList<Object>();
property = new ();
property.setElementType("UxElement");
property.setElementId(null);
property.setStringId("alert_message");
property.setOverride(true);
property.setValue("Are you sure that you want to cancel your selection?");
localizedStrings.add(property);
additionalData.put("LocalizedStrings", localizedStrings);
valuePutRequestBody.setAdditionalData(additionalData);
graphClient.identity().b2cUserFlows().byB2cIdentityUserFlowId("{b2cIdentityUserFlow-id}").languages().byUserFlowLanguageConfigurationId("{userFlowLanguageConfiguration-id}").overridesPages().byUserFlowLanguagePageId("{userFlowLanguagePage-id}").content().put(valuePutRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const stream = {
LocalizedStrings: [
{
ElementType: 'UxElement',
ElementId: null,
StringId: 'alert_message',
Override: true,
Value: 'Are you sure that you want to cancel your selection?'
}
]
};
await client.api('/identity/b2cUserFlows/B2C_1_Customer/languages/en/overridesPages/phonefactor/$value')
.version('beta')
.put(stream);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Identity\B2cUserFlows\Item\Languages\Item\OverridesPages\Item\Value\$valuePutRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new $valuePutRequestBody();
$additionalData = [
'LocalizedStrings' => [
[
'elementType' => 'UxElement',
'elementId' => null,
'stringId' => 'alert_message',
'override' => true,
'value' => 'Are you sure that you want to cancel your selection?',
],
],
];
$requestBody->setAdditionalData($additionalData);
$graphServiceClient->identity()->b2cUserFlows()->byB2cIdentityUserFlowId('b2cIdentityUserFlow-id')->languages()->byUserFlowLanguageConfigurationId('userFlowLanguageConfiguration-id')->overridesPages()->byUserFlowLanguagePageId('userFlowLanguagePage-id')->content()->put($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Identity.SignIns
$params = @{
LocalizedStrings = @(
@{
ElementType = "UxElement"
ElementId = $null
StringId = "alert_message"
Override = $true
Value = "Are you sure that you want to cancel your selection?"
}
)
}
Set-MgBetaIdentityB2CUserFlowLanguageOverridePageContent -B2cIdentityUserFlowId $b2cIdentityUserFlowId -UserFlowLanguageConfigurationId $userFlowLanguageConfigurationId -UserFlowLanguagePageId $userFlowLanguagePageId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.identity.b2cuserflows.item.languages.item.overridespages.item.value.$value_put_request_body import $valuePutRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = $valuePutRequestBody(
additional_data = {
"localized_strings" : [
{
"element_type" : "UxElement",
"element_id" : None,
"string_id" : "alert_message",
"override" : True,
"value" : "Are you sure that you want to cancel your selection?",
},
],
}
)
await graph_client.identity.b2c_user_flows.by_b2c_identity_user_flow_id('b2cIdentityUserFlow-id').languages.by_user_flow_language_configuration_id('userFlowLanguageConfiguration-id').overrides_pages.by_user_flow_language_page_id('userFlowLanguagePage-id').content.put(request_body)
Respuesta
En el ejemplo siguiente se muestra la respuesta.
Nota: Se puede acortar el objeto de respuesta que se muestra aquí para mejorar la legibilidad.
HTTP/1.1 204 No Content