How to Register an Application with Microsoft Entra(Azure AD) and SharePoint Graph API Access Permission

Ryan Shrestha
3 min readJul 3, 2024

--

Microsoft Entra Logo

Welcome to the SharePoint Archiving Solution Series:

This blog is divided into multiple sections, each focusing on a crucial aspect of the migration process. Below are links to navigate directly to each section:

  1. Introduction
  2. Pre-requisites
  3. Application Registration and API Permissions
  4. PowerShell Script Workflow
  5. Understanding the PowerShell Script — Part 1
  6. Understanding the PowerShell Script — Part 2
  7. Understanding the PowerShell Script — Part 3
  8. Get Full Script from GitHub

Register an Application

  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
  2. Browse to Identity > Applications > App registrations and select New registration.
  3. Enter a name for your application. Under Supported account types, select the appropriate option (Accounts in this organizational directory only).
  4. Leave Redirect URI (optional) Empty
  5. Click on Register.
Microsoft Identity Platform App registration

Retrieve Tenant ID and Application (Client ID)

App registration Application ID, Tenant ID and Client ID

Configure API Permissions

  1. After registering the application, navigate to API permissions.
  2. Click on Add a permission.
  3. Select Microsoft Graph.
  4. Select Application permissions.
  5. In the search box, type Sites.ReadWrite.All and select it.
  6. Click on Add permissions.
  7. Click on Grant admin consent for [your tenant] to grant admin consent for the permissions. This step ensures that the permissions are applied across your organization.
Microsoft Graph API Sharepoint Read Write All Permission

Generate Client Secrets

  1. In the Azure AD app registration overview, navigate to Certificates & secrets.
  2. Under Client secrets, click on New client secret.
  3. Enter a description, select an expiration period (recommended to choose an appropriate period), and click Add.
  • Note: Copy the client secret value immediately as it will be hidden later for security reasons.
Create Client Secret Application Registration

You can now use the obtained credentials (Client ID and Client Secret) along with the Tenant ID in your applications to authenticate with Azure AD and call Microsoft Graph API, specifically with permissions to read and write to SharePoint sites in this Scenario.

< Previous1 2 3 4 5 6 7Next >

--

--

Ryan Shrestha
0 Followers

Diving into the ocean of Communicational Technologies.