APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
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.
The single member of the identitySources collection should be of either the domainIdentitySource or externalDomainFederation type. If the caller provides a domainIdentitySource, the call is successful, and the domain corresponds to a registered domain of an Azure Active Directory tenant, then the resulting connectedOrganization that is created will have an identitySources collection containing a single member of the azureActiveDirectoryTenant type.
Response
If successful, this method returns a 201 Created response code and a new connectedOrganization object in the response body.
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var connectedOrganization = new ConnectedOrganization
{
DisplayName = "Connected organization name",
Description = "Connected organization description",
IdentitySources = new List<IdentitySource>()
{
new DomainIdentitySource
{
DomainName = "example.com",
DisplayName = "example.com"
}
},
State = ConnectedOrganizationState.Proposed
};
await graphClient.IdentityGovernance.EntitlementManagement.ConnectedOrganizations
.Request()
.AddAsync(connectedOrganization);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := graphmodels.NewConnectedOrganization()
displayName := "Connected organization name"
requestBody.SetDisplayName(&displayName)
description := "Connected organization description"
requestBody.SetDescription(&description)
identitySource := graphmodels.NewIdentitySource()
additionalData := map[string]interface{}{
"domainName" : "example.com",
"displayName" : "example.com",
}
identitySource.SetAdditionalData(additionalData)
identitySources := []graphmodels.IdentitySourceable {
identitySource,
}
requestBody.SetIdentitySources(identitySources)
state := graphmodels.PROPOSED_CONNECTEDORGANIZATIONSTATE
requestBody.SetState(&state)
result, err := graphClient.IdentityGovernance().EntitlementManagement().ConnectedOrganizations().Post(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new ConnectedOrganization();
$requestBody->setDisplayName('Connected organization name');
$requestBody->setDescription('Connected organization description');
$identitySourcesIdentitySource1 = new IdentitySource();
$identitySourcesIdentitySource1->set@odatatype('#microsoft.graph.domainIdentitySource');
$additionalData = [
'domainName' => 'example.com',
'displayName' => 'example.com',
];
$identitySourcesIdentitySource1->setAdditionalData($additionalData);
$identitySourcesArray []= $identitySourcesIdentitySource1;
$requestBody->setIdentitySources($identitySourcesArray);
$requestBody->setState(new ConnectedOrganizationState('proposed'));
$requestResult = $graphServiceClient->identityGovernance()->entitlementManagement()->connectedOrganizations()->post($requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.