Clave de la entidad. Es de solo lectura y generada automáticamente. Heredado de roleAssignment
displayName
Cadena
El nombre descriptivo o para mostrar de la asignación de roles. Heredado de roleAssignment
description
Cadena
Descripción de la asignación de roles. Heredado de roleAssignment
resourceScopes
Colección string
Lista de identificadores de grupos de seguridad de miembros del ámbito de roles. Estos son los identificadores de Azure Active Directory. Heredado de roleAssignment
members
Colección string
La lista de identificadores de grupos de seguridad de miembros de roles. Estos son los identificadores de Azure Active Directory.
Respuesta
Si se ejecuta correctamente, este método devuelve un código de respuesta 200 OK y un objeto deviceAndAppManagementRoleAssignment actualizado en el cuerpo de la respuesta.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceAndAppManagementRoleAssignment
{
OdataType = "#microsoft.graph.deviceAndAppManagementRoleAssignment",
DisplayName = "Display Name value",
Description = "Description value",
ResourceScopes = new List<string>
{
"Resource Scopes value",
},
Members = new List<string>
{
"Members value",
},
};
// To initialize your graphClient, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.RoleAssignments["{deviceAndAppManagementRoleAssignment-id}"].PatchAsync(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.NewDeviceAndAppManagementRoleAssignment()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
description := "Description value"
requestBody.SetDescription(&description)
resourceScopes := []string {
"Resource Scopes value",
}
requestBody.SetResourceScopes(resourceScopes)
members := []string {
"Members value",
}
requestBody.SetMembers(members)
// To initialize your graphClient, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=go
roleAssignments, err := graphClient.DeviceManagement().RoleAssignments().ByDeviceAndAppManagementRoleAssignmentId("deviceAndAppManagementRoleAssignment-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceAndAppManagementRoleAssignment deviceAndAppManagementRoleAssignment = new DeviceAndAppManagementRoleAssignment();
deviceAndAppManagementRoleAssignment.setOdataType("#microsoft.graph.deviceAndAppManagementRoleAssignment");
deviceAndAppManagementRoleAssignment.setDisplayName("Display Name value");
deviceAndAppManagementRoleAssignment.setDescription("Description value");
LinkedList<String> resourceScopes = new LinkedList<String>();
resourceScopes.add("Resource Scopes value");
deviceAndAppManagementRoleAssignment.setResourceScopes(resourceScopes);
LinkedList<String> members = new LinkedList<String>();
members.add("Members value");
deviceAndAppManagementRoleAssignment.setMembers(members);
DeviceAndAppManagementRoleAssignment result = graphClient.deviceManagement().roleAssignments().byDeviceAndAppManagementRoleAssignmentId("{deviceAndAppManagementRoleAssignment-id}").patch(deviceAndAppManagementRoleAssignment);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.device_and_app_management_role_assignment import DeviceAndAppManagementRoleAssignment
# To initialize your graph_client, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DeviceAndAppManagementRoleAssignment(
odata_type = "#microsoft.graph.deviceAndAppManagementRoleAssignment",
display_name = "Display Name value",
description = "Description value",
resource_scopes = [
"Resource Scopes value",
],
members = [
"Members value",
],
)
result = await graph_client.device_management.role_assignments.by_device_and_app_management_role_assignment_id('deviceAndAppManagementRoleAssignment-id').patch(request_body)
Aquí tiene un ejemplo de la respuesta. Nota: Es posible que el objeto de respuesta que aparezca aquí esté truncado para abreviar. Todas las propiedades se devolverán desde una llamada real.