Auth0 Identity Unlink Fails for Google Apps Connection via Management API

Overview

This article addresses an issue where the DELETE /api/v2/users/{id}/identities/{provider}/{user_id} endpoint returns a 200 OK response but fails to unlink the identity. This behavior occurs when attempting to unlink a Google Apps identity via the Management API.

Applies To
  • Management API
  • Google Apps Connection
  • Identity Unlinking
Cause

The issue occurs because the incorrect user_id value is provided in the API request. Depending on the connection configuration, the required user_id format for Google Apps connections varies and may be email-based, Google ID-based, or an opaque GUID. It is recommended to check the specific user_id format to ensure accuracy.

Solution

Follow these steps to successfully unlink the identity:

  1. Verify the correct user_id format for the Google Apps connection by retrieving the user's profile.

  2. Execute the DELETE request using the email address as the user_id parameter.

    • id: <primary_user_id>

    • provider: google-apps

    • user_id: <user_email>

Recommended content

No recommended content found...