Request and grant permissions to Azure APIs for the Azure app for OneDrive for Business.
Procedure
-
In the navigation pane, click API permissions.
-
Click Add a permission.
The Request API permissions pane appears.
-
Select Microsoft Graph.
-
Click Application permissions.
-
Add the following permissions:
-
Directory: Directory.Read.All
-
Files: Files.ReadWrite.All
-
User: User.Read.All
-
Notes: Notes.ReadWrite.All
-
Application: Application.ReadWrite.OwnedBy
-
Reports: Reports.Read.All
-
Policy: Policy.Read.All
-
-
Click Add permissions.
-
Click Add a permission.
-
In the Request API permissions pane, select SharePoint.
-
Click Application permissions, expand Sites, and select: Sites.FullControl.All.
-
Click Add permissions.
-
Click Grant admin consent for tenant_name.
-
Click Yes.
*The Application.ReadWrite.OwnedBy permission is required for auto key rotation. If you want Metallic to auto rotate secret keys, then have this permission assigned.
If you choose to assign this permission to your Azure app, you may need to run this PowerShell command to add the Azure app as owner of itself:
az ad app owner add --id <app-id> --owner-object-id <object-id>
Where:
- <app-id>: The Application (client) ID of your Azure app (e.g., 062f19f5-9dbf-48fe-adf7-94539bd3fa8e)
- <object-id>: The Object ID of your Azure app (e.g., 55f5965a-48bd-49ee-bcbd-21a55bd18af1)