\>To access OneDrive- Personal file using Graph API.
Below are files present in my OneDrive-Personal Account:

Initially, I registered **multi-tenant** Microsoft Entra ID Application with Support Account type: Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox) and added `redirect_uri: https://jwt.ms `:

For accessing files needs to add **at least `Files.Read.All`** API permission, Added delegated type `Files.Read.All.All` API permission and Granted Admin Consent like below:

Using delegated type flow were user-interaction is required, so using authorization_code flow. Ran below authorization `code` request into browser:
```
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?
client_id=<Client-Id>
&response_type=code
&redirect_uri=https://jwt.ms
&response_mode=query
&scope=https://graph.microsoft.com/Files.Read.All
&state=12345
```
This request prompt you for sign-in with your OneDrive-Personal account User like below:

After `Accept` you will get `authorization_code`:

Now, Generate access token using below `Body` parameters:
```
GET https://login.microsoftonline.com/common/oauth2/v2.0/token
client_id: <APP_ID>
client_secret: <CLIENT SECRET>
scope:https://
grant_type:authorization_code
redirect_uri:https://jwt.ms
code:AUTHORIZATION_CODE_GENERATE_FROM_BROWSER
```

To access the OneDrive-Personal account file use below query with this generated access token:
```
GET https://graph.microsoft.com/v1.0/me/drive/root/children?select=name
Authoization: Bearer token
Content-type: application/json
```
**Response:**

**Reference:**
[OneDrive in Microsoft Graph API](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/?view=odsp-graph-online)