If /$ref is not appended to the request and the calling app has permissions to manage the user who is the app owner, the user will also be deleted from Azure Active Directory (Azure AD); otherwise, a 403 Forbidden error is returned. You can restore deleted users through the Restore deleted items API.
Request headers
Name
Description
Authorization
Bearer {token}. Required.
Request body
In the request body, supply the identifier of the directory object to be assigned as owner.
Response
If successful, this method returns a 204 No Content response code.
var graphClient = new GraphServiceClient(requestAdapter);
await graphClient.Applications["{application-id}"].Owners["{directoryObject-id}"].Ref.DeleteAsync();
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
graphClient.ApplicationsById("application-id").OwnersById("directoryObject-id").Ref().Delete(context.Background(), nil)
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$graphServiceClient->applicationsById('application-id')->ownersById('directoryObject-id')->ref()->delete();