Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
EntitlementManagement.ReadWrite.All
Not available.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
EntitlementManagement.ReadWrite.All
Not available.
HTTP request
POST /identityGovernance/entitlementManagement/connectedOrganizations
A collection with one element, the initial identity source in this connected organization.
state
connectedOrganizationState
The state of a connected organization defines whether assignment policies with requestor scope type AllConfiguredConnectedOrganizationSubjects are applicable or not. Possible values are: configured, proposed.
Response
If successful, this method returns a 201 Created response code and a new connectedOrganization object in the response body.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new ConnectedOrganization
{
DisplayName = "Connected organization name",
Description = "Connected organization description",
IdentitySources = new List<IdentitySource>
{
new DomainIdentitySource
{
OdataType = "#microsoft.graph.domainIdentitySource",
DomainName = "example.com",
DisplayName = "example.com",
},
},
State = ConnectedOrganizationState.Proposed,
};
// 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.ConnectedOrganizations.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ConnectedOrganization connectedOrganization = new ConnectedOrganization();
connectedOrganization.setDisplayName("Connected organization name");
connectedOrganization.setDescription("Connected organization description");
LinkedList<IdentitySource> identitySources = new LinkedList<IdentitySource>();
DomainIdentitySource identitySource = new DomainIdentitySource();
identitySource.setOdataType("#microsoft.graph.domainIdentitySource");
identitySource.setDomainName("example.com");
identitySource.setDisplayName("example.com");
identitySources.add(identitySource);
connectedOrganization.setIdentitySources(identitySources);
connectedOrganization.setState(ConnectedOrganizationState.Proposed);
ConnectedOrganization result = graphClient.identityGovernance().entitlementManagement().connectedOrganizations().post(connectedOrganization);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.connected_organization import ConnectedOrganization
from msgraph.generated.models.identity_source import IdentitySource
from msgraph.generated.models.domain_identity_source import DomainIdentitySource
from msgraph.generated.models.connected_organization_state import ConnectedOrganizationState
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ConnectedOrganization(
display_name = "Connected organization name",
description = "Connected organization description",
identity_sources = [
DomainIdentitySource(
odata_type = "#microsoft.graph.domainIdentitySource",
domain_name = "example.com",
display_name = "example.com",
),
],
state = ConnectedOrganizationState.Proposed,
)
result = await graph_client.identity_governance.entitlement_management.connected_organizations.post(request_body)