See all services → Shopify Plus Partner
API Developer

Unlink Customer Social Logins With One Admin API Call

API version 2027-01 adds identityProviderSubjectDelete, letting you unlink a customer from a third-party identity provider. The call ends all active sessions and the link restores on next sign-in.

Executive summary

What changed

As of API version 2027-01, identityProviderSubjectDelete removes the link between a customer record and a third-party identity provider subject. It takes two required arguments: customerId, and id for the subject itself. Subject IDs are readable from the identityProviderSubjects field on the Customer object, so lookup and unlink sequence in one flow.

Two behaviours matter operationally. Unlinking signs the customer out of all existing sessions, so the action is immediate rather than deferred to token expiry. And it is not permanent: the next time that customer signs in through the same provider, the link is re-established. The mutation requires the write_customers access scope.

Why it matters

This is a narrow capability, and worth being honest about. It does not change a merchant's commercial options and will not appear in a roadmap conversation. What it does is close a support gap that has been awkward to handle.

Consider the cases. A customer signs up with a social provider on a work email, leaves the company, and can no longer authenticate. Two accounts merge and one carries a link pointing at an address the customer no longer controls. A provider account is compromised and the merchant wants the link cut now. Each previously required a manual workaround or an unsatisfying answer. Now it is an API call behind an internal tool.

The forced sign-out is the part to design around. Because unlinking ends every active session, it is a security action as much as an administrative one, which suits compromise response but also means calling it casually logs a customer out mid-session. Teams running new customer accounts on Shopify should decide deliberately where this belongs in their support tooling.

Role-specific impact

Use-case example

Real-world scenario

A B2B supplier runs customer accounts with Google and Microsoft sign-in across roughly 4,000 trade accounts. Some 20 to 30 tickets a month come from buyers who changed employer or had a provider account deprovisioned, each taking about 25 minutes of manual account work. With identityProviderSubjectDelete behind an internal support tool, the agent verifies the buyer, triggers the unlink, and the buyer re-authenticates on their next sign-in. At 25 tickets a month that is roughly 10 hours returned monthly, and a buyer who is not blocked from ordering.

Implementation checklist

  1. Confirm the API version you target and plan the move to 2027-01, since the mutation does not exist earlier.
  2. Verify your app or custom integration holds the write_customers access scope.
  3. Query Customer.identityProviderSubjects to confirm you can resolve subject IDs for the providers you support.
  4. Build the unlink behind an authenticated internal tool, with a customer verification step ahead of it.
  5. Handle userErrors explicitly and surface a clear outcome to the agent rather than a silent pass.
  6. Log who triggered each unlink, for which customer, and when, given that it ends all sessions.
  7. Test the loop in a development store: unlink, confirm sign-out, sign in again, confirm the link is restored.
  8. Document for your support team when an unlink is the right answer, and when it is not.

FAQ

Q: Does unlinking delete the customer account or any of its order history?

A: No. It removes only the link between the customer record and that identity provider subject. The customer, their orders, and their data are untouched. The visible effect is that they are signed out everywhere and must authenticate again.

Q: Can we use this to permanently block a customer from signing in with a given provider?

A: No, and it should not be used that way. The link is re-created the next time the customer signs in through that provider, so this is a reset rather than a block. Access restrictions belong in your permissions model.

Resources

identityProviderSubjectDelete mutation reference, Shopify.dev

Need guidance? Talk to Makro.