Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use un permiso o permisos con privilegios superiores 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)
EntitlementManagement.ReadWrite.All
No disponible.
Delegado (cuenta personal de Microsoft)
No admitida.
No admitida.
Aplicación
EntitlementManagement.ReadWrite.All
No disponible.
Solicitud HTTP
POST /identityGovernance/entitlementManagement/catalogs
En el cuerpo de la solicitud, proporcione una representación JSON del objeto accessPackageCatalog .
Puede especificar las siguientes propiedades al crear un accessPackageCatalog.
Propiedad
Tipo
Descripción
displayName
Cadena
Nombre para mostrar del catálogo de paquetes de acceso.
description
Cadena
Descripción del catálogo de paquetes de acceso.
state
accessPackageCatalogState
Tiene el valor published si los paquetes de acceso están disponibles para la administración. Los valores posibles son: unpublished y published.
isExternallyVisible
Booleano
Si los usuarios fuera del inquilino pueden solicitar los paquetes de acceso de este catálogo.
Respuesta
Si se ejecuta correctamente, este método devuelve un código de respuesta de la serie 200 y un nuevo objeto accessPackageCatalog en el cuerpo de la respuesta.
POST https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/catalogs
Content-Type: application/json
{
"displayName": "sales",
"description": "for employees working with sales and outside sales partners",
"state": "published",
"isExternallyVisible": true
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new AccessPackageCatalog
{
DisplayName = "sales",
Description = "for employees working with sales and outside sales partners",
State = AccessPackageCatalogState.Published,
IsExternallyVisible = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.IdentityGovernance.EntitlementManagement.Catalogs.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewAccessPackageCatalog()
displayName := "sales"
requestBody.SetDisplayName(&displayName)
description := "for employees working with sales and outside sales partners"
requestBody.SetDescription(&description)
state := graphmodels.PUBLISHED_ACCESSPACKAGECATALOGSTATE
requestBody.SetState(&state)
isExternallyVisible := true
requestBody.SetIsExternallyVisible(&isExternallyVisible)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
catalogs, err := graphClient.IdentityGovernance().EntitlementManagement().Catalogs().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AccessPackageCatalog accessPackageCatalog = new AccessPackageCatalog();
accessPackageCatalog.setDisplayName("sales");
accessPackageCatalog.setDescription("for employees working with sales and outside sales partners");
accessPackageCatalog.setState(AccessPackageCatalogState.Published);
accessPackageCatalog.setIsExternallyVisible(true);
AccessPackageCatalog result = graphClient.identityGovernance().entitlementManagement().catalogs().post(accessPackageCatalog);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\AccessPackageCatalog;
use Microsoft\Graph\Generated\Models\AccessPackageCatalogState;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new AccessPackageCatalog();
$requestBody->setDisplayName('sales');
$requestBody->setDescription('for employees working with sales and outside sales partners');
$requestBody->setState(new AccessPackageCatalogState('published'));
$requestBody->setIsExternallyVisible(true);
$result = $graphServiceClient->identityGovernance()->entitlementManagement()->catalogs()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.access_package_catalog import AccessPackageCatalog
from msgraph.generated.models.access_package_catalog_state import AccessPackageCatalogState
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = AccessPackageCatalog(
display_name = "sales",
description = "for employees working with sales and outside sales partners",
state = AccessPackageCatalogState.Published,
is_externally_visible = True,
)
result = await graph_client.identity_governance.entitlement_management.catalogs.post(request_body)