Hi @Glenn Maxwell,
You can create a CSV file of the share information by generate a Sharing Report. You could go to Settings on top (cog wheel), OneDrive settings, More settings and finally under the Manage access section, click Run sharing report. You will then be asked to select where to store the report
The report may take some time to run depending on the size of the site. Here is the document for reference
https://zcusa.951200.xyz/en-us/sharepoint/sharing-reports
Additionally, you can also refer to reportroot-getonedriveusagefilecounts if you need to use graph api
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.