Delete identityProvider (deprecated)
Article
07/26/2023
10 contributors
Feedback
In this article
Namespace: microsoft.graph
Caution
This identity provider API is deprecated and will stop returning data after March, 2023. Please use the new identity provider API .
Delete an existing identityProvider .
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)
IdentityProvider.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
Not supported.
The work or school account must be a global administrator of the tenant.
HTTP request
DELETE /identityProviders/{id}
Name
Description
Authorization
Bearer {token}. Required.
Request body
Do not supply a request body for this method.
Response
If successful, this method returns 204 No Content
response code.
Example
The following example deletes an identityProvider .
Request
DELETE https://graph.microsoft.com/v1.0/identityProviders/Amazon-OAuth
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
await graphClient.IdentityProviders["{identityProvider-id}"].DeleteAsync();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
graphClient.IdentityProviders().ByIdentityProviderId("identityProvider-id").Delete(context.Background(), nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
graphClient.identityProviders("Amazon-OAuth")
.buildRequest()
.delete();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
const options = {
authProvider,
};
const client = Client.init(options);
await client.api('/identityProviders/Amazon-OAuth')
.delete();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->identityProviders()->byIdentityProviderId('identityProvider-id')->delete()->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
await graph_client.identity_providers.by_identity_provider_id('identityProvider-id').delete()
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Response
HTTP/1.1 204 No Content