The `Files.ReadWrite.AppFolder` scope requires additional permissions for folder to be provisioned

Viewed 28

This is an issue I'm seeing for MSAs (Personal OneDrives)

I've created an AAD App registration with the User.Read and Files.ReadWrite.AppFolder Graph API permissions. The application is intended to be used to upload scanned documents from a scanner to the user's OneDrive.

I get an Access Denied exception when calling the graphClient.Drive.Special.AppRoot.ItemWithPath(<random filename>).CreateUploadSession().Request().PostAsync() API. However, if I add the Files.ReadWrite.All API permission to the AAD App registration, have a user consent to that permission, upload a file to the app folder, remove the Files.ReadWrite.All API permission, and reauthenticate the user, calls to graphClient.Drive.Special.AppRoot.ItemWithPath(<random filename>).CreateUploadSession().Request().PostAsync() work as expected.

This seems to be an issue with the initial provision of the app folder.

1 Answers
Related