Graph API registration
Table of contents
How to register your Graph API
Start by navigating to the App registrations service.
Create a brand new App registration.
Register your graph API.
Generete a new registration client secret and do not forget to store the corresponding values as they will only be readable once.
Navigate to the API permissions tab and add new permissions.
Select the Microsoft API (Microsoft Graph) to give access to.
Select which type of permissions our application require: Application permissions.
Check that all required microsoft graph permissions are selected and Grant admin consent for Elqano.
Finally look up for the following permissions:
Key | Abilities |
---|---|
Group.Read.All | Read all groups |
Sites.Read.All | Read items in all site collections |
User.Read.All | Read all users’ full profiles |
TeamsAppInstallation.ReadWriteForUser.All | Install bot for users |
OpenId | Enable users logging in Teams |
In the authentication section ensure the tokens are enabled.
⚠️ 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 Method | Path | Purpose |
---|---|---|
GET | /v1.0/users | Search for users by their email. |
GET | /v1.0/users/:user_id | Get the common of a user (email, first name, last name) |
GET | /v1.0/users/:user_id/photo/$value | Get the profile picture of a user. |
GET | /v1.0/sites | Search into Sharepoint online sites. |
GET | /v1.0/sites/:site_id/drives | List drives collection attached to a sharepoint site. |
GET | /v1.0/sites/:site_id/lists | List document collection attached to a drive |
GET | /v1.0/sites/:site_id/lists/:list_id/items | List documents attached to a drive. |
GET | /v1.0/drives/:drive_id | Get a specific drive. |
GET | /v1.0/drives/:drive_id/root/search | Search for documents into a specific drive. |
GET | /v1.0/drives/:drive_id/items/:item_id | Get a specific drive document. |
GET | /v1.0/drives/:drive_id/items/:item_id/versions | Get versions of a specific document. |
The complete Microsoft Graph API documentation could be found at https://docs.microsoft.com/en-us/graph/overview.