(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
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.
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
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:
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.
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 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
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:
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:
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:
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!
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)
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