As we are mainly responsible for general issue of Microsoft Teams, your question which is involved in script is not supported by us, I would add office-teams-app-dev tag for further help. Thanks for your understanding.
I found an API – Drive resource type. The drive resource is the top-level object representing a user's OneDrive or a document library in SharePoint. You could check if it meets your requirements.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.