删除 samlOrWsFedExternalDomainFederation
本文内容
命名空间:microsoft.graph
重要
Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
删除 samlOrWsFedExternalDomainFederation 对象。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限 。
权限类型
权限(从最低特权到最高特权)
委派(工作或学校帐户)
IdentityProvider.ReadWrite.All
委派(Microsoft 个人帐户)
不支持。
应用程序
IdentityProvider.ReadWrite.All
工作或学校帐户需要属于以下 Azure Active Directory (Azure AD) 角色之一 :
HTTP 请求
DELETE directory/federationConfigurations/{samlOrWsFedExternalDomainFederation ID}
名称
说明
Authorization
Bearer {token}。必需。
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法返回 204 No Content 响应代码。
示例
请求
DELETE https://graph.microsoft.com/beta/directory/federationConfigurations/96db02e2-80c1-5555-bc3a-de92ffb8c5be
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
await graphClient.Directory.FederationConfigurations["{identityProviderBase-id}"]
.Request()
.DeleteAsync();
const options = {
authProvider,
};
const client = Client.init(options);
await client.api('/directory/federationConfigurations/96db02e2-80c1-5555-bc3a-de92ffb8c5be')
.version('beta')
.delete();
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/directory/federationConfigurations/96db02e2-80c1-5555-bc3a-de92ffb8c5be"]]];
[urlRequest setHTTPMethod:@"DELETE"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
graphClient.directory().federationConfigurations("96db02e2-80c1-5555-bc3a-de92ffb8c5be")
.buildRequest()
.delete();
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
identityProviderBaseId := "identityProviderBase-id"
graphClient.Directory().FederationConfigurationsById(&identityProviderBaseId).Delete()
Import-Module Microsoft.Graph.Identity.DirectoryManagement
Remove-MgDirectoryFederationConfiguration -IdentityProviderBaseId $identityProviderBaseId
响应
HTTP/1.1 204 No Content