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.
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.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.IndustryData;
var requestBody = new SourceSystemDefinition
{
DisplayName = "Rostering source",
UserMatchingSettings = new List<UserMatchingSetting>
{
new UserMatchingSetting
{
MatchTarget = new UserMatchTargetReferenceValue
{
Code = "userPrincipalName",
},
PriorityOrder = 0,
SourceIdentifier = new IdentifierTypeReferenceValue
{
Code = "username",
},
AdditionalData = new Dictionary<string, object>
{
{
"roleGroup@odata.bind" , "https://graph.microsoft.com/beta/external/industryData/roleGroups/staff"
},
},
},
new UserMatchingSetting
{
MatchTarget = new UserMatchTargetReferenceValue
{
Code = "userPrincipalName",
},
PriorityOrder = 1,
SourceIdentifier = new IdentifierTypeReferenceValue
{
Code = "username",
},
AdditionalData = new Dictionary<string, object>
{
{
"roleGroup@odata.bind" , "https://graph.microsoft.com/beta/external/industryData/roleGroups('students')"
},
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.External.IndustryData.SourceSystems.PostAsync(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.
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.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.models.industrydata.SourceSystemDefinition sourceSystemDefinition = new com.microsoft.graph.beta.models.industrydata.SourceSystemDefinition();
sourceSystemDefinition.setDisplayName("Rostering source");
LinkedList<com.microsoft.graph.beta.models.industrydata.UserMatchingSetting> userMatchingSettings = new LinkedList<com.microsoft.graph.beta.models.industrydata.UserMatchingSetting>();
com.microsoft.graph.beta.models.industrydata.UserMatchingSetting userMatchingSetting = new com.microsoft.graph.beta.models.industrydata.UserMatchingSetting();
com.microsoft.graph.beta.models.industrydata.UserMatchTargetReferenceValue matchTarget = new com.microsoft.graph.beta.models.industrydata.UserMatchTargetReferenceValue();
matchTarget.setCode("userPrincipalName");
userMatchingSetting.setMatchTarget(matchTarget);
userMatchingSetting.setPriorityOrder(0);
com.microsoft.graph.beta.models.industrydata.IdentifierTypeReferenceValue sourceIdentifier = new com.microsoft.graph.beta.models.industrydata.IdentifierTypeReferenceValue();
sourceIdentifier.setCode("username");
userMatchingSetting.setSourceIdentifier(sourceIdentifier);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("roleGroup@odata.bind", "https://graph.microsoft.com/beta/external/industryData/roleGroups/staff");
userMatchingSetting.setAdditionalData(additionalData);
userMatchingSettings.add(userMatchingSetting);
com.microsoft.graph.beta.models.industrydata.UserMatchingSetting userMatchingSetting1 = new com.microsoft.graph.beta.models.industrydata.UserMatchingSetting();
com.microsoft.graph.beta.models.industrydata.UserMatchTargetReferenceValue matchTarget1 = new com.microsoft.graph.beta.models.industrydata.UserMatchTargetReferenceValue();
matchTarget1.setCode("userPrincipalName");
userMatchingSetting1.setMatchTarget(matchTarget1);
userMatchingSetting1.setPriorityOrder(1);
com.microsoft.graph.beta.models.industrydata.IdentifierTypeReferenceValue sourceIdentifier1 = new com.microsoft.graph.beta.models.industrydata.IdentifierTypeReferenceValue();
sourceIdentifier1.setCode("username");
userMatchingSetting1.setSourceIdentifier(sourceIdentifier1);
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("roleGroup@odata.bind", "https://graph.microsoft.com/beta/external/industryData/roleGroups('students')");
userMatchingSetting1.setAdditionalData(additionalData1);
userMatchingSettings.add(userMatchingSetting1);
sourceSystemDefinition.setUserMatchingSettings(userMatchingSettings);
com.microsoft.graph.models.industrydata.SourceSystemDefinition result = graphClient.external().industryData().sourceSystems().post(sourceSystemDefinition);
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
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\SourceSystemDefinition;
use Microsoft\Graph\Generated\Models\UserMatchingSetting;
use Microsoft\Graph\Generated\Models\UserMatchTargetReferenceValue;
use Microsoft\Graph\Generated\Models\IdentifierTypeReferenceValue;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SourceSystemDefinition();
$requestBody->setDisplayName('Rostering source');
$userMatchingSettingsUserMatchingSetting1 = new UserMatchingSetting();
$userMatchingSettingsUserMatchingSetting1MatchTarget = new UserMatchTargetReferenceValue();
$userMatchingSettingsUserMatchingSetting1MatchTarget->setCode('userPrincipalName');
$userMatchingSettingsUserMatchingSetting1->setMatchTarget($userMatchingSettingsUserMatchingSetting1MatchTarget);
$userMatchingSettingsUserMatchingSetting1->setPriorityOrder(0);
$userMatchingSettingsUserMatchingSetting1SourceIdentifier = new IdentifierTypeReferenceValue();
$userMatchingSettingsUserMatchingSetting1SourceIdentifier->setCode('username');
$userMatchingSettingsUserMatchingSetting1->setSourceIdentifier($userMatchingSettingsUserMatchingSetting1SourceIdentifier);
$additionalData = [
'roleGroup@odata.bind' => 'https://graph.microsoft.com/beta/external/industryData/roleGroups/staff',
];
$userMatchingSettingsUserMatchingSetting1->setAdditionalData($additionalData);
$userMatchingSettingsArray []= $userMatchingSettingsUserMatchingSetting1;
$userMatchingSettingsUserMatchingSetting2 = new UserMatchingSetting();
$userMatchingSettingsUserMatchingSetting2MatchTarget = new UserMatchTargetReferenceValue();
$userMatchingSettingsUserMatchingSetting2MatchTarget->setCode('userPrincipalName');
$userMatchingSettingsUserMatchingSetting2->setMatchTarget($userMatchingSettingsUserMatchingSetting2MatchTarget);
$userMatchingSettingsUserMatchingSetting2->setPriorityOrder(1);
$userMatchingSettingsUserMatchingSetting2SourceIdentifier = new IdentifierTypeReferenceValue();
$userMatchingSettingsUserMatchingSetting2SourceIdentifier->setCode('username');
$userMatchingSettingsUserMatchingSetting2->setSourceIdentifier($userMatchingSettingsUserMatchingSetting2SourceIdentifier);
$additionalData = [
'roleGroup@odata.bind' => 'https://graph.microsoft.com/beta/external/industryData/roleGroups(\'students\')',
];
$userMatchingSettingsUserMatchingSetting2->setAdditionalData($additionalData);
$userMatchingSettingsArray []= $userMatchingSettingsUserMatchingSetting2;
$requestBody->setUserMatchingSettings($userMatchingSettingsArray);
$result = $graphServiceClient->external()->industryData()->sourceSystems()->post($requestBody)->wait();
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.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.