Link Search Menu Expand Document

Graph API registration

Table of contents
  1. How to register your Graph API
  2. What are the API end-points used by the application?

How to register your Graph API

Start by navigating to the App registrations service.

App Registration Tab

Create a brand new App registration.

New App Registration

Register your graph API.

Register Graph API

Generete a new registration client secret and do not forget to store the corresponding values as they will only be readable once.

Generate Client Secret

Navigate to the API permissions tab and add new permissions.

API Permissions

Select the Microsoft API (Microsoft Graph) to give access to.

API Permissions 1

Select which type of permissions our application require: Application permissions.

API Permissions 2

Check that all required microsoft graph permissions are selected and Grant admin consent for Elqano.

Grant Admin consent

Finally look up for the following permissions:

KeyAbilities
Group.Read.AllRead all groups
Sites.Read.AllRead items in all site collections
User.Read.AllRead all users’ full profiles
TeamsAppInstallation.ReadWriteForUser.AllInstall bot for users
OpenIdEnable users logging in Teams

In the authentication section ensure the tokens are enabled.

Authentication OpenID

Validate Admin consent

⚠️ Do not forget to validate the given admin consent. If not the selected permissions will not be granted.

What are the API end-points used by the application?

The root URL is https://graph.microsoft.com

Http MethodPathPurpose
GET/v1.0/usersSearch for users by their email.
GET/v1.0/users/:user_idGet the common of a user (email, first name, last name)
GET/v1.0/users/:user_id/photo/$valueGet the profile picture of a user.
GET/v1.0/sitesSearch into Sharepoint online sites.
GET/v1.0/sites/:site_id/drivesList drives collection attached to a sharepoint site.
GET/v1.0/sites/:site_id/listsList document collection attached to a drive
GET/v1.0/sites/:site_id/lists/:list_id/itemsList documents attached to a drive.
GET/v1.0/drives/:drive_idGet a specific drive.
GET/v1.0/drives/:drive_id/root/searchSearch for documents into a specific drive.
GET/v1.0/drives/:drive_id/items/:item_idGet a specific drive document.
GET/v1.0/drives/:drive_id/items/:item_id/versionsGet versions of a specific document.

The complete Microsoft Graph API documentation could be found at https://docs.microsoft.com/en-us/graph/overview.