A React application to view and visualise the status of tasks from a Microsoft Planner plan (kanban board). The application uses MSAL React to sign-in a user and obtain a JWT access token for Microsoft Graph API from Azure AD.
Tasks are grouped by swimlanes, refered to as buckets within MS Planner, and the status of each task wihin a bucket grouped by To-do, Complete, Priority, and Late.
This project was based on the following Microsoft example: https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph
You can run this application locally by:
-
Create an account on the Azure Portal if you dont already have one.
-
Create a new App Registration.
- Click App Registrations then, click New Registration
- Give the app a name e.g. Planner Tasks
- Select Accounts in this organizational directory only.
- Click Register.
-
Add a platform and redirect URIs
- Select the Authentication blade
- Click add a platform
- Enter these two redict URIs:
- Click save.
-
Add the Microsoft Graph delegated permissions.
- Select the API permissions blade.
- Select the Add a permission button.
- Select the Add a permission button and then select Microsoft Graph.
- In the Delegated permissions section, select the User.Read, Tasks.Read in the list.
- Select the Add permissions button at the bottom to save.
-
Record your Application (client) ID and Directory (tenant) ID from the Overview blade.
-
Record the ID of one of your plans from Microsoft Planenr
- Create an account on Microsoft Planner this must be on the same tenant as your Azure Portal account.
- Create a new plan.
- Open the plan and record the planId from the address bar.
-
Clone this repository
git clone git@github.com:oli-drew/planner-tasks.git
-
Navigate to inside the repository
cd planner-tasks/
-
Install the required packages using
npm install
-
Copy and rename the .env.EXAMPLE file.
cp .env.EXAMPLE .env
-
Configure your web application environment variables.
- Open the .env file you previously created in your IDE.
- Enter your Application (client) ID after REACT_APP_AAD_APP_CLIENT_ID= e.g.
REACT_APP_AAD_APP_CLIENT_ID="1234"
- Enter your Directory (tenant) ID after REACT_APP_AAD_APP_TENANT_ID= e.g.
REACT_APP_AAD_APP_TENANT_ID="1234"
- Enter your Planner Plan ID after REACT_APP_AAD_APP_PLAN_ID= e.g.
REACT_APP_AAD_APP_PLAN_ID="1234"
- Save the file.
-
Start the server by running
npm start
- Navigate to: http://localhost:3000/
- Click the "Login" button.
- Sign in with your Microsoft account.
- Click the "Task Board" button to navigate to the tasks page.
- This application can be installed as a PWA.
A deployed version of the application is available here: https://tasks.peterdrew.com/
The following technology stack was used:
- React
- MUI and Emotion
- Microsoft MSAL
- Microsoft Graph
- Recharts
- Dayjs
- Workbox
- Deployed to Azure Static Web Apps
This project is licensed under MIT.
- Oliver Drew
If you have any questions please contact me via GitHub or Email