2022-05-23 14:57:36 +02:00

3.3 KiB

My Awards

Summary

This webpart is using the beta MS Graph Profile endpoint to list your awards. At the time of writing this sample (May 2022), this is a Beta endpoint, so it could change in the future. A future version of this webpart could include the ability to add new awards to your profile.

In the meantime, you can add a new award using this request: https://docs.microsoft.com/en-us/graph/api/profile-post-awards?view=graph-rest-beta&tabs=http (You can use Graph Explorer tool to do so.)

my-awards

Used SharePoint Framework Version

version

Applies to

Get your own free development tenant by subscribing to Microsoft 365 developer program

Prerequisites

You need to grant any of these permissions to MS Graph API (from least to most privileged): User.Read, User.ReadWrite, User.ReadBasic.All, User.Read.All, User.ReadWrite.All

Suggest you to use the Microsoft 365 CLI

Solution

Solution Author(s)
react-graph-profile-awards Luis Mañez (MVP, ClearPeople, @luismanez)

Version history

Version Date Comments
1.0 May 23, 2022 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • Clone this repository
  • Configure SharePoint permissions to Graph API (see Prerequisites). Suggest you to use the Microsoft 365 CLI
  • Ensure that you are at the solution folder
  • in the command-line run:
    • npm install
    • gulp serve

Features

This extension illustrates the following concepts:

  • Using the MS Graph Profile Awards endpoint to list the awards of the current user
  • Using ServiceScope and DI concept to get a MSGraphClientFactory

References