Only a single instance of a certificateBasedAuthConfiguration can be created (the collection can only have one member). It always has a fixed ID with a value of '29728ade-6ae4-4ee9-9103-412912537da5'.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Organization.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
Organization.ReadWrite.All
For delegated scenarios, the calling user must have the Global AdministratorAzure AD role.
HTTP request
POST /organization/{id}/certificateBasedAuthConfiguration
Collection of certificate authorities that creates a trusted certificate chain. Each member of the collection must contain certificate and isRootAuthority properties.
Response
If successful, this method returns 201 Created response code and a new certificateBasedAuthConfiguration object in the response body.
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new CertificateBasedAuthConfigurationPostRequestBody();
$additionalData = [
'certificateAuthorities' => $certificateAuthorities1 = new ();
$certificateAuthorities1->setIsRootAuthority(true);
$ certificateAuthorities1->setCertificate('Binary');
$certificateAuthoritiesArray []= $certificateAuthorities1;
$requestBody->setCertificateAuthorities($certificateAuthoritiesArray);
];
$requestBody->setAdditionalData($additionalData);
$graphServiceClient->organizationById('organization-id')->certificateBasedAuthConfiguration()->post($requestBody);