There's no direct method to download but you can use graph API and write some code around it to download.
You can use List all teams in Microsoft Teams for an organization and List users graph APIs to get the required data.
Here is the sample utilizing the Microsoft Graph API to retrieve data about the user. You can modify this as per your requirements.
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
To use it inside app you need to get access token and then you can use same https://graph.microsoft.com/v1.0/groups to get desire data.
Here are the two ways to get access token:
We haven't heard anything from you. Is this issue solved for you?
If the response is helpful, please click "Accept Answer" and upvote it.