Q:

Can we generate a link to downlaod a document in SharePoint without login?

I'm implementing an application to store and fetch some company wide documents in a SharePoint site. And only use this application to manage those. 
I created an admin account to the site and got client id and secret to access the site using Graph API. I'm trying to use client credentials we got to upload and download these documents. But the generated download url for the document still need to login to the site with a valid account. 
Is there a way to create/generate a url from the data we could fetch from Graph API to download documents without needing to login.

A:

You need to implement Get access without a user.
Add the one of the required Application permissions: Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Sites.ReadWrite.All into your Azure AD app.

Call this API: Download the contents of a DriveItem to get the download link.
It won't require you to sign in.

