# Request and Grant Permissions for Azure APIs for OneDrive for Business

Request and grant permissions to Azure APIs for the Azure app for OneDrive for Business.

## Procedure

1. In the navigation pane, click API permissions.

2. Click Add a permission.

   The Request API permissions pane appears.

3. Select Microsoft Graph.

4. Click Application permissions.

5. 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

6. Click Add permissions.

7. Click Add a permission.

8. In the Request API permissions pane, select SharePoint.

9. Click Application permissions, expand Sites, and select: Sites.FullControl.All.

10. Click Add permissions.

11. Click Grant admin consent for tenant_name.

12. 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)

×

Loading...