Auth0 Home Blog Docs

Management API does not return app_metadata

management-api
manage-users

#1

We’ve been getting users using the PHP Management API, including app_metadata info.

Code excerpt:

$params = array(
	'fields' => 'user_id,email,app_metadata,identities',
	'include_fields' => 'true',
	'q' => $searchCondition,
	'search_engine' => 'v2'
);
$api = new Management(Config::AUTH0_MANAGEMENT_USERS_TOKEN, Config::AUTH0_DOMAIN);
$api->users->search($params);

Now users are still returned, but the app_metada info is missing. This is an example of data returned for a demo user;

[0] => Array
            (
                [identities] => Array
                    (
                        [0] => Array
                            (
                                [isSocial] => 
                                [user_id] => 59f8a53546509072ef2558d3
                                [provider] => auth0
                                [connection] => DB-devel
                            )

                    )

                [user_id] => auth0|59f8a53546509072ef2558d3
                [email] => admin@devel0.com
            )

    )

Are there any API changes that can explain this behavior?

The used Auth0 client is not OIDC comformant.

Please this is a very critical feature affecting all our customers. User management is now broken inside our application.


#2

Did you try using the Auth0 Management API Explorer at https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id? Does it give you the same response?


#3

Depending on the actual timings you observed the issue it’s likely that was connected to this incident where indeed some requests to the Management APi failed to return user metadata. However, the situation should now be resolved do let me know if you still experience an issue.


#4

Yes that was the problem. We have opened a ticket and it is now solved. Thanks.


#5

Yes that was the problem. We have opened a ticket and it is now solved. Thanks.


#6