This is a two-step process, in which you generate the API key (one time) and grant OneDrive access for all the accounts whose OneDrive data needs to be accessed
Step 1: Get access to the M365 Graph API
Step 2: Make the user's OneDrive content available for access via the API(This step has to be done for all users whose OneDrive data needs to be accessed.)