Пространство имен: microsoft.graph
Создает новый объект externalOriginResourceConnector .
Разрешения
Выберите разрешение или разрешения, помеченные как наименее привилегированные для этого API. Используйте более высокий уровень привилегий или разрешений, только если это требуется вашему приложению. Дополнительные сведения о делегированных разрешениях и разрешениях приложений см. в статье Типы разрешений. Дополнительные сведения об этих разрешениях см. в справочнике по разрешениям.
| Тип разрешения |
Разрешения с наименьшим объемом привилегий |
Разрешения с более высоким уровнем привилегий |
| Делегированные (рабочая или учебная учетная запись) |
EntitlementManagement.ReadWrite.All |
Недоступно. |
| Делегированные (личная учетная запись Майкрософт) |
Не поддерживается. |
Не поддерживается. |
| Приложение |
EntitlementManagement.ReadWrite.All |
Недоступно. |
HTTP-запрос
POST /identityGovernance/entitlementManagement/externalOriginResourceConnectors
| Имя |
Описание |
| Авторизация |
Bearer {token}. Обязательно. Дополнительные сведения об аутентификации и авторизации. |
| Content-Type |
application/json. Обязательно. |
Текст запроса
В тексте запроса укажите JSON-представление объекта externalOriginResourceConnector .
При создании externalOriginResourceConnector можно указать следующие свойства.
| Свойство |
Тип |
Описание |
| connectionInfo |
connectionInfo |
Сведения о подключении для соединителя ресурсов внешнего источника. Обязательно. |
| Тип соединителя |
Тип соединителя |
Тип соединителя. Возможные значения: sapIag, unknownFutureValue. Обязательный. |
| description |
String |
Описание соединителя ресурсов внешнего происхождения. Обязательно. |
| displayName |
String |
Отображаемое имя соединителя ресурсов внешнего источника. Обязательно. |
Отклик
В случае успеха этот метод возвращает 201 Created код отклика и объект externalOriginResourceConnector в тексте ответа.
Примеры
Запрос
Ниже показан пример запроса.
POST https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/externalOriginResourceConnectors
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.externalOriginResourceConnector",
"displayName": "SAP IAG Connector",
"description": "This connector helps integrate Microsoft Entra with SAP IAG",
"connectorType": "sapIag",
"connectionInfo": {
"@odata.type": "microsoft.graph.externalTokenBasedSapIagConnectionInfo",
"url": "https://contoso.example.com",
"accessTokenUrl": "https://contoso.example.com/oauth/token",
"clientId": "e9ad8b1d-959c-4e86-8ba2-2cbf4d14bc29",
"keyVaultName": "Keyvault",
"secretName": "clientSecret",
"subscriptionId": "5ee98b73-d9df-43a7-8a92-36855054bdee",
"resourceGroup": "SAP IAG Group"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new ExternalOriginResourceConnector
{
OdataType = "#microsoft.graph.externalOriginResourceConnector",
DisplayName = "SAP IAG Connector",
Description = "This connector helps integrate Microsoft Entra with SAP IAG",
ConnectorType = ConnectorType.SapIag,
ConnectionInfo = new ExternalTokenBasedSapIagConnectionInfo
{
OdataType = "microsoft.graph.externalTokenBasedSapIagConnectionInfo",
Url = "https://contoso.example.com",
AccessTokenUrl = "https://contoso.example.com/oauth/token",
ClientId = "e9ad8b1d-959c-4e86-8ba2-2cbf4d14bc29",
KeyVaultName = "Keyvault",
SecretName = "clientSecret",
SubscriptionId = "5ee98b73-d9df-43a7-8a92-36855054bdee",
ResourceGroup = "SAP IAG Group",
},
};
// 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.ExternalOriginResourceConnectors.PostAsync(requestBody);
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
// 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.NewExternalOriginResourceConnector()
displayName := "SAP IAG Connector"
requestBody.SetDisplayName(&displayName)
description := "This connector helps integrate Microsoft Entra with SAP IAG"
requestBody.SetDescription(&description)
connectorType := graphmodels.SAPIAG_CONNECTORTYPE
requestBody.SetConnectorType(&connectorType)
connectionInfo := graphmodels.NewExternalTokenBasedSapIagConnectionInfo()
url := "https://contoso.example.com"
connectionInfo.SetUrl(&url)
accessTokenUrl := "https://contoso.example.com/oauth/token"
connectionInfo.SetAccessTokenUrl(&accessTokenUrl)
clientId := "e9ad8b1d-959c-4e86-8ba2-2cbf4d14bc29"
connectionInfo.SetClientId(&clientId)
keyVaultName := "Keyvault"
connectionInfo.SetKeyVaultName(&keyVaultName)
secretName := "clientSecret"
connectionInfo.SetSecretName(&secretName)
subscriptionId := "5ee98b73-d9df-43a7-8a92-36855054bdee"
connectionInfo.SetSubscriptionId(&subscriptionId)
resourceGroup := "SAP IAG Group"
connectionInfo.SetResourceGroup(&resourceGroup)
requestBody.SetConnectionInfo(connectionInfo)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
externalOriginResourceConnectors, err := graphClient.IdentityGovernance().EntitlementManagement().ExternalOriginResourceConnectors().Post(context.Background(), requestBody, nil)
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ExternalOriginResourceConnector externalOriginResourceConnector = new ExternalOriginResourceConnector();
externalOriginResourceConnector.setOdataType("#microsoft.graph.externalOriginResourceConnector");
externalOriginResourceConnector.setDisplayName("SAP IAG Connector");
externalOriginResourceConnector.setDescription("This connector helps integrate Microsoft Entra with SAP IAG");
externalOriginResourceConnector.setConnectorType(ConnectorType.SapIag);
ExternalTokenBasedSapIagConnectionInfo connectionInfo = new ExternalTokenBasedSapIagConnectionInfo();
connectionInfo.setOdataType("microsoft.graph.externalTokenBasedSapIagConnectionInfo");
connectionInfo.setUrl("https://contoso.example.com");
connectionInfo.setAccessTokenUrl("https://contoso.example.com/oauth/token");
connectionInfo.setClientId("e9ad8b1d-959c-4e86-8ba2-2cbf4d14bc29");
connectionInfo.setKeyVaultName("Keyvault");
connectionInfo.setSecretName("clientSecret");
connectionInfo.setSubscriptionId("5ee98b73-d9df-43a7-8a92-36855054bdee");
connectionInfo.setResourceGroup("SAP IAG Group");
externalOriginResourceConnector.setConnectionInfo(connectionInfo);
ExternalOriginResourceConnector result = graphClient.identityGovernance().entitlementManagement().externalOriginResourceConnectors().post(externalOriginResourceConnector);
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
const options = {
authProvider,
};
const client = Client.init(options);
const externalOriginResourceConnector = {
'@odata.type': '#microsoft.graph.externalOriginResourceConnector',
displayName: 'SAP IAG Connector',
description: 'This connector helps integrate Microsoft Entra with SAP IAG',
connectorType: 'sapIag',
connectionInfo: {
'@odata.type': 'microsoft.graph.externalTokenBasedSapIagConnectionInfo',
url: 'https://contoso.example.com',
accessTokenUrl: 'https://contoso.example.com/oauth/token',
clientId: 'e9ad8b1d-959c-4e86-8ba2-2cbf4d14bc29',
keyVaultName: 'Keyvault',
secretName: 'clientSecret',
subscriptionId: '5ee98b73-d9df-43a7-8a92-36855054bdee',
resourceGroup: 'SAP IAG Group'
}
};
await client.api('/identityGovernance/entitlementManagement/externalOriginResourceConnectors')
.post(externalOriginResourceConnector);
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\ExternalOriginResourceConnector;
use Microsoft\Graph\Generated\Models\ConnectorType;
use Microsoft\Graph\Generated\Models\ExternalTokenBasedSapIagConnectionInfo;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExternalOriginResourceConnector();
$requestBody->setOdataType('#microsoft.graph.externalOriginResourceConnector');
$requestBody->setDisplayName('SAP IAG Connector');
$requestBody->setDescription('This connector helps integrate Microsoft Entra with SAP IAG');
$requestBody->setConnectorType(new ConnectorType('sapIag'));
$connectionInfo = new ExternalTokenBasedSapIagConnectionInfo();
$connectionInfo->setOdataType('microsoft.graph.externalTokenBasedSapIagConnectionInfo');
$connectionInfo->setUrl('https://contoso.example.com');
$connectionInfo->setAccessTokenUrl('https://contoso.example.com/oauth/token');
$connectionInfo->setClientId('e9ad8b1d-959c-4e86-8ba2-2cbf4d14bc29');
$connectionInfo->setKeyVaultName('Keyvault');
$connectionInfo->setSecretName('clientSecret');
$connectionInfo->setSubscriptionId('5ee98b73-d9df-43a7-8a92-36855054bdee');
$connectionInfo->setResourceGroup('SAP IAG Group');
$requestBody->setConnectionInfo($connectionInfo);
$result = $graphServiceClient->identityGovernance()->entitlementManagement()->externalOriginResourceConnectors()->post($requestBody)->wait();
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.external_origin_resource_connector import ExternalOriginResourceConnector
from msgraph.generated.models.connector_type import ConnectorType
from msgraph.generated.models.external_token_based_sap_iag_connection_info import ExternalTokenBasedSapIagConnectionInfo
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ExternalOriginResourceConnector(
odata_type = "#microsoft.graph.externalOriginResourceConnector",
display_name = "SAP IAG Connector",
description = "This connector helps integrate Microsoft Entra with SAP IAG",
connector_type = ConnectorType.SapIag,
connection_info = ExternalTokenBasedSapIagConnectionInfo(
odata_type = "microsoft.graph.externalTokenBasedSapIagConnectionInfo",
url = "https://contoso.example.com",
access_token_url = "https://contoso.example.com/oauth/token",
client_id = "e9ad8b1d-959c-4e86-8ba2-2cbf4d14bc29",
key_vault_name = "Keyvault",
secret_name = "clientSecret",
subscription_id = "5ee98b73-d9df-43a7-8a92-36855054bdee",
resource_group = "SAP IAG Group",
),
)
result = await graph_client.identity_governance.entitlement_management.external_origin_resource_connectors.post(request_body)
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
Отклик
Ниже показан пример отклика.
Примечание. Объект отклика, показанный здесь, может быть сокращен для удобочитаемости.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.externalOriginResourceConnector",
"id": "ea32a820-9c92-428d-ba21-a33b0c00cfb2",
"displayName": "SAP IAG Connector",
"description": "This connector helps integrate Microsoft Entra with SAP IAG",
"connectorType": "sapIag",
"connectionInfo": {
"@odata.type": "microsoft.graph.externalTokenBasedSapIagConnectionInfo",
"url": "https://contoso.example.com",
"accessTokenUrl": "https://contoso.example.com/oauth/token",
"clientId": "e9ad8b1d-959c-4e86-8ba2-2cbf4d14bc29",
"keyVaultName": "Keyvault",
"secretName": "clientSecret",
"subscriptionId": "5ee98b73-d9df-43a7-8a92-36855054bdee",
"resourceGroup": "SAP IAG Group"
},
"createdBy": "admin@contoso.com",
"createdDateTime": "2026-02-23T10:15:30Z",
"modifiedBy": null,
"modifiedDateTime": null
}