The connection does not support user creation through the API for social signin

I have implemented google oauth by using google’s client python library. After google authentication, now i have user’s data like ‘sub’, ‘iss’, ‘aud’, ‘email’, etc, also i have google access token. By using this data how I can create user in auth0. I tried to create user by using ‘api/v2/users’ api with connection ‘google-oauth2’. but the response i’m getting is

{"statusCode":400,"error":"Bad Request","message":"The connection does not support user creation through the API. It must either be a database or sms connection.","errorCode":"operation_not_supported"}

Can you please somebody help me to do this process?

Hi @soorya , welcome to auth0!

It’s not possible.
When it comes to social connections, user data are managed by the specific IdP (like google). Auth0 creates an account based on data provided by this IdP while the user logs in. In other words, the accounts are created and updated only during sign up and sing in by default.

It’s possible to update user metadata via API (with no changes to default settings) or root level user profile data if the “Sync user profile attributes at each login” for this specific connection is disabled:

Hope this helps, please let us know any questions!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.