Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 939 Bytes

File metadata and controls

31 lines (24 loc) · 939 Bytes
description Automatically generated file. DO NOT MODIFY
// Code snippets are only available for the latest version. Current version is 5.x

// Dependencies
using Microsoft.Graph.Models;

var requestBody = new ExternalAuthenticationMethodConfiguration
{
	OdataType = "#microsoft.graph.externalAuthenticationMethodConfiguration",
	IncludeTargets = new List<AuthenticationMethodTarget>
	{
		new AuthenticationMethodTarget
		{
			TargetType = AuthenticationMethodTargetType.Group,
			Id = "b183b746-e7db-4fa2-bafc-69ecf18850dd",
			IsRegistrationRequired = false,
		},
	},
	State = AuthenticationMethodState.Enabled,
};

// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Policies.AuthenticationMethodsPolicy.AuthenticationMethodConfigurations["{authenticationMethodConfiguration-id}"].PatchAsync(requestBody);