App_metadata attributes are blank in output of users export

(Side note: The tags need help, I put in ‘app_metadata’, et al, and nothing is displayed. I can’t even type it in. Why are the tags function in this topic creation not working?)

Hi Community,
When we try to export info from any of the app_metadata attributes like say app_metadata.name or app_metadata.address.city, the fields are empty.
Yet we can see this information elsewhere in Auth0.
We tried json and csv export format types.
Please advise.
Thank you for your time and help!
Best Regards,
Donald



2024-05-16 09_41_04-trulab-dev (11).csv - Excel

Hi @donald.collins,

Thanks for letting us know about the tags. We will look into this!

As for the user export, it should work if your user has those properties defined in their app_metadata.

I have inspected some of your users on your tenant and did not find any of the ones I searched to have app_metadata.name or app_metadata.address.city.

Could you check if your users have those properties defined?

Let me know how that goes.

Thanks,
Rueben

Hello,
When we try to export info from any of the app_metadata attributes, such as mgh patient portal app_metadata.name or app_metadata.address.city, the fields are empty. However, we can see this information elsewhere in Auth0. We tried both JSON and CSV export formats.

1 Like

Hi Rueben, Thank you for your quick reply and help.
I have access only to the trulab-dev site and that’s probably why we don’t see those properties defined there? But I will ask a co-worker that has trulab-prod access to check for those defined properties and let you know!
Thanks.
Best Regards,
Donald

1 Like

Hi Rueben, I heard back from the co-worker with prod access.
It seems she can get that data in the export but for only (1) column/attribute per user (ie many columns/fields to get them all) vs them all being listed in (1) column. Here’s what she said in screenshot below:
2024-05-17 11_48_18-TruLab Mail

Thank you for your help!
Best Regards,
Donald

1 Like

Hi @donald.collins,

Thanks for the update.

I got a chance to inspect the screenshot you shared and see that your co-worker is trying to export attributes that are different from the ones you originally posted.

Now, if you need to export the allowed_protocols_ids in the whole column rather than individual items of the array, you can call app_metadata.allowed_protocol_ids.

I hope that helps!

Thanks,
Rueben

Hi Rueben, Yes sorry for the confusion I created between what I was using for attributes vs what attributes my co-worker is trying to export. My co-worker got back to me and she tried calling ‘app_metadata.allowed_protocol_ids’, she said;
“I have already tried that on prod and it returned empty cells”.
Please advise!

Thank you for your time and help.
Best Regards,
Donald

Hi @donald.collins,

I have tested this on my end and could export the app_metadata.allowed_protocol_ids without issues.

Can you send me a direct message from your co-worker’s tenant and user that they are trying to export?

After that, could you update this thread and let me know once that’s done?

Thanks,
Rueben

Hi Rueben - Okay will that sounds like some progress! I’m not following this exactly, “Can you send me a direct message from your co-worker’s tenant and user that they are trying to export?”
How do I get her (or I) to accomplish this?
Thank you for your help and time!
Best Regards,
Donald

1 Like

Okay I have figured out what you meant by the direct message.
She’s going to go to your page

and then send you a message…

Or she’ll give me the info and I’ll send you a message…

By the way, are you a Auth0 employee?

-dc

1 Like

Hi @donald.collins,

Thanks for the quick replies.

Yes, I am an Auth0 employee.

And I’ll keep a look out for a direct message from your co-worker.

Thanks,
Rueben

Very welcome Rueben!
She said she can’t send the actual user names b/c of Hipaa rules (this is clinical data) but she provided this " the tenant is just “trulab” I think and the connection I was exporting was “dnli-prod” "
Also, she blocked out the usernames so that is actually not empty just the allowed_protocol_ids ( " I’ve blocked out the names for data privacy of our users, but the app_metadata.allowed_protocol_ids column is empty" )
When she builds the export calling for name and allowed_protocol_ids using that connection she gets blank output:
2024-05-21 15_03_22-TruLab Mail

Hi @donald.collins,

Thanks for the information.

I looked over your screenshot and found it odd that even the users’ names are missing from the result.

I inspected the tenant and the users in the connection you shared. I do see that these users have the app_metadata.allowed_protocol_ids property.

I retested the import/export extension and found that the issue occurs only with the .csv format. Exporting in JSON works correctly.

Here’s how I configured my export in the extension:

Could you verify if you have the same setup?



Rueben
1 Like

Hi Rueben,
The setup is not the same, we are not using “Username-Password-Authentication” for the Connection choice.
When exporting out to a json file and using “All Connections” for Connection choice my dev environment only shows the ‘Name’ data and no column or info for “app_metadata.allowed_protocol_ids”, it is blank.
I will ask my co-worker to run the exact same but in production.
She’ll use name, app_metadata.allowed_protocol_ids and JSON format and select one of the production connections - I’ll let you know what she gets.
Thank you for your time and patience!
Below are the screenshots from my dev environment run:

2024-05-22 09_37_09-User Import _ Export Dashboard
2024-05-22 09_37_50-trulab-dev (3).json - Notepad

Best Regards,
Donald

Hi @donald.collins,

Thanks for the update.

Yes, it makes sense that you chose your preferred connection to export.

I checked this information in the trulab tenant and confirmed that it should work correctly since there are users with the app_metadata.allowed_protocol_ids property. Could you confirm with your co-worker?

Next, I checked your trulab-dev tenant and found that you have 0 users with the app_metadata.allowed_protocol_ids property. See screenshot below:

Given that, you’ll want to ensure you have at least 1 user containing the app_metadata.allowed_protocol_ids property.

Could you check and retry again and let me know how it goes for you?

Cheers,
Rueben

1 Like

Hi Rueben, Thank you looking into, " I checked your trulab-dev tenant and found that you have 0 users with the app_metadata.allowed_protocol_ids property"
That is good to know…

My co-worker got back to me and I have some good news. In prod, using the .JSON format as output she is seeing both the “name” information and the “app_metadata.allowed_protocol_ids” information, below is a screenshot that she took when she opened the .json file in excel:

Question, she now needs to convert the outputted json file to a .csv file - do you have a favorite converter app/program to accomplish this? I see a lot of options on line and just thought I’d ask if you had any you use/like etc…
Thanks!

Best Regards,
Donald

Hi @donald.collins,

That’s great news it’s working now!

I don’t personally have a favorite converter that can change the file from json to .csv.

In these scenarios, I typically write a Python script to convert it to .csv.

Here is what I used:

import pandas as pd

def json_to_csv(json_file_path, csv_file_path):
    # Read JSON file into a dataframe
    df = pd.read_json(json_file_path, lines=True)
    
    # Save dataframe to a CSV file, delimited by a comma
    df.to_csv(csv_file_path, index=False, sep=',')

json_file_path = 'input.json' # Path to your JSON file
csv_file_path = 'output.csv' # Path where CSV file will be saved

json_to_csv(json_file_path, csv_file_path)

I hope that helps!

Thanks,
Rueben

1 Like

Thank you Rueben for all your help!
And a big thank you for the python script!
We had started trying to do the same with Ruby and it’s a bit more involved.
We’ll try this python script as well it seems more concise and much less code.
Best Regards,
Donald

1 Like

Hi @donald.collins,

Of course, you’re welcome!

That sounds good regarding the Python script.

Feel free to reach out if you have any additional questions!

Cheers,
Rueben

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