Follow these steps to obtain your API credentials from the Microsoft Entra admin center.
Sign in to the Azure Portal and search for "App Registrations".
Click on + New Registration.
Name it "Link Generator", set the account type to "Single Tenant", and click Register.
On the left sidebar, go to Certificates & secrets. Click + New client secret.
Give it a description (e.g., "Web Key") and set an expiration.
Go to API permissions > + Add a permission > Microsoft Graph.
Choose Application permissions (not Delegated).
Files.Read.AllSites.Read.All
Finally, click the "Grant admin consent for [Your Org]" button.
This is required for the application to access files without a user login.
If you need a specific Drive ID, you can use the Graph Explorer.
Run the query: GET https://graph.microsoft.com/v1.0/me/drive to see your personal drive details.
Need more help? Check the Official Graph API Docs.
Go to App