10 |
11 | Here's an overview of the application solution:
12 |
13 | 
14 |
15 | ### Pre-requisites
16 | - [Node](https://nodejs.org) - Node 16+ and npm 7+ will be used for this project
17 | - [git](https://learn.microsoft.com/devops/develop/git/install-and-set-up-git)
18 | - [Visual Studio Code](https://code.visualstudio.com/)
19 | - [Azure Functions Extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions)
20 | - [Azure subscription](https://azure.microsoft.com/free/search)
21 | - [Microsoft 365 developer tenant](https://developer.microsoft.com/microsoft-365/dev-program)
22 | - [GitHub account](https://github.com)
23 |
24 | ### Technologies used in this tutorial include
25 | - React
26 | - Azure Communication Services
27 | - Azure Functions
28 | - Microsoft Graph
29 | - Microsoft Teams
--------------------------------------------------------------------------------
/tutorials/docs/Authentication-App-With-NextJs-And-Microsoft-Graph/02-Structuring-Project.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 2. Structuring the Project
3 | sidebar_position: 1
4 | ---
5 |
6 | Once we already created our application on the Azure Portal, we can start to code our application. In this tutorial we will use Next.js. But you can use any other framework you want. Let's install the Next.js framework!
7 |
8 | Open your terminal and run the following command:
9 |
10 | ```bash
11 | npx create-next-app auth-app --typescript
12 | ```
13 |
14 | Now we already have our application created, let's execute it to see if everything is working.
15 |
16 | ```bash
17 | cd auth-app
18 | ```
19 |
20 | ```bash
21 | npm run dev
22 | ```
23 |
24 | Open the browser and go to the following address: `http://localhost:3000`.
25 |
26 | Now we need to install some dependencies. And one of them is the **[Microsoft Graph Client](https://learn.microsoft.com/en-us/graph/sdks/create-client?tabs=Javascript)**. To install it, run the following command:
27 |
28 | ```bash
29 | npm install @microsoft/microsoft-graph-client
30 | ```
31 |
32 | If you want to know more about the Microsoft Graph Client, **[you can read the documentation](https://docs.microsoft.com/en-us/graph/sdks/sdks-overview)**. And also, **[know about the NPM package](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)**.
33 |
34 | Another package we will need to install is NextAuth.js. It is a library that helps us to integrate authentication login sessions with Next.js. To install it, run the following command:
35 |
36 | ```bash
37 | npm install next-auth
38 | ```
39 |
40 | Also, if you want to know more about NextAuth.js, **[you can read the documentation](https://next-auth.js.org/)**. And also, **[know about the NPM package](https://www.npmjs.com/package/next-auth)**.
41 |
42 | Now we can finally start to create some components for our application. But we will do that in the next section.
43 |
44 |
--------------------------------------------------------------------------------
/tutorials/docs/Authentication-App-With-NextJs-And-Microsoft-Graph/08-Next-Steps-Conclusion.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 8. Next Steps & Final Words
3 | sidebar_position: 1
4 | ---
5 |
6 | # Next Steps & Final Words
7 |
8 | We hope you enjoyed this workshop and learned something new! If you have any questions or comments, don't hesitate to reach out to us!
9 |
10 | If you want to go further, make the `Take break reminder app workshop`. There we will go into the `Reminder` page. A page that will inform you each 60 minutes to take a break. If you want to make this workshop, go to the Workshop Reminder App.
11 |
12 | If you want to learn more about Microsoft Graph, we have a lot of free courses and Learn Modules about it. Below you can see some interesting resources and links:
13 |
14 | - ✅ **[Microsoft Graph Fundalmentals](https://learn.microsoft.com/en-us/training/paths/m365-msgraph-fundamentals/)**
15 | - ✅ **[Access a user's calendar events in a JavaScript app with Microsoft Graph](https://learn.microsoft.com/en-us/training/modules/msgraph-access-user-events/)**
16 | - ✅ **[Show a user's emails in a JavaScript app with Microsoft Graph](https://learn.microsoft.com/en-us/training/modules/msgraph-show-user-emails/)**
17 | - ✅ **[Download and upload files in a JavaScript app with Microsoft Graph](https://learn.microsoft.com/en-us/training/modules/msgraph-manage-files/)**
18 | - ✅ **[Access user photo information by using Microsoft Graph](https://learn.microsoft.com/en-us/training/modules/msgraph-user-photo-information/)**
19 | - ✅ **[Configure a JavaScript application to retrieve Microsoft 365 data by using Microsoft Graph](https://learn.microsoft.com/en-us/training/modules/msgraph-javascript-app/)**
20 | - ✅ **[Build apps with Microsoft Graph – Associate](https://learn.microsoft.com/en-us/training/paths/m365-msgraph-associate/)**
21 |
22 | And, see you in the next workshop! 😊
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/tutorials/docs/Automate-Data-Reporting-with-Azure-Functions-and-Power-Automate/01-Install-the-Azure-Functions-Extension-and-Create-a-New-Function.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 1. Install the Azure Functions Extension and Create a New Function
3 | sidebar_position: 1
4 | ---
5 |
6 | # Exercise 1
7 |
8 | ## Install the Azure Functions Extension for VS Code
9 |
10 | In this exercise you'll create an empty project, install the Azure Functions extension for VS Code, and create a new function.
11 |
12 | To get started, perform the following tasks:
13 |
14 | 1. Create an empty folder on your desktop and open it in VS Code.
15 |
16 | 1. Install the [Azure Functions extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions) if it's not already installed.
17 |
18 | 1. Click on the **Azure** icon in the VS Code sidebar.
19 |
20 | :::note
21 | If you don't see the Azure icon after installing the Azure Functions extension, right-click on the VS Code sidebar and select **Azure** from the menu.
22 | :::
23 |
24 | 1. Sign in to Azure if you're not already signed in.
25 |
26 | 
27 |
28 | 1. Locate the **Workspace** section and click the **+** icon.
29 | 1. Select **Create Function** and then select **Yes**.
30 |
31 | 
32 |
33 | 1. Select the following:
34 |
35 | - **Language** : TypeScript
36 | - **Trigger** : HTTP trigger
37 | - **Function Name** : getGitHubRepoStats
38 | - **Authorization level** : Anonymous
39 |
40 |
41 |
42 | :::note
43 | If you opened an existing project folder instead of an empty one, you may be prompted to overwrite the **.gitignore** and **package.json** files.
44 | :::
45 |
46 | 1. You will see the following folder and files added to your project:
47 |
48 | 
--------------------------------------------------------------------------------
/tutorials/docs/Automate-Data-Reporting-with-Azure-Functions-and-Power-Automate/03-Create-and-Deploy-the-Function-App-to-Azure.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 3. Create and Deploy the Function App to Azure
3 | sidebar_position: 3
4 | ---
5 |
6 | # Exercise 3
7 |
8 | ## Create and Deploy the Function App to Azure
9 |
10 | Now that the function is working locally, it's time to deploy it to Azure.
11 |
12 | 1. Open the VS Code command pallet (`shift + cmd + p` on Mac | `shift + ctrl + p` on Windows), and select **Azure Functions: Create Function App in Azure**.
13 |
14 | 
15 |
16 | 1. You'll be prompted to enter the following information:
17 |
18 | - Your Azure subscription name.
19 | - The function name - enter `getGitHubRepoStats`
20 |
21 | :::note
22 | A globally unique name is required. You can make the name more unique by adding a number or your last name to the end of the name.
23 | :::
24 |
25 | - The runtime stack - Select the latest `Node.js LTS` version.
26 | - The region (select any region you'd like).
27 |
28 | 1. Once the Azure Function App is created you’ll see a message about viewing the details.
29 |
30 | 1. The next step is to deploy the code. Go back to the command pallet in VS Code and select **Azure Functions: Deploy to Function App**. You'll be asked to select your subscription and the Function App name you created earlier.
31 |
32 | 1. Once the function is deployed to Azure, do the following:
33 |
34 | - Select the Azure extension in VS Code (click the Azure icon in the sidebar).
35 | - Expand your subscription.
36 | - Expand your Function App.
37 | - Right-click on the function and select **Browse Website**. Ensure the function app is working correctly.
38 | - Add `/api/getGitHubRepoStats` to the URL and you should see data returned from your function.
39 |
40 | 1. Perform the following steps:
41 |
42 | - Copy the Azure Function domain to a local file.
43 | - Copy the JSON data returned from the function call to a local file.
44 |
45 | You'll use these values in the next exercise.
46 |
47 |
--------------------------------------------------------------------------------
/tutorials/docs/Automate-Data-Reporting-with-Azure-Functions-and-Power-Automate/05-Congratulations.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 5
3 | ---
4 |
5 | # Congratulations!
6 |
7 | ## You've completed this tutorial!
8 |
9 | 
10 |
11 | To clean up your resources, perform the following tasks:
12 |
13 | 1. Go to the Azure Portal:
14 |
15 | - Delete your Azure Active Directory app registration.
16 | - Delete your Azure Functions resource group.
17 |
18 | 1. Go back to your Power Automate flow's home screen and select **Delete** from the top toolbar.
19 |
20 | 1. Go to your OneDrive account and delete the **data** folder.
--------------------------------------------------------------------------------
/tutorials/docs/Automate-Data-Reporting-with-Azure-Functions-and-Power-Automate/index.md:
--------------------------------------------------------------------------------
1 | # Automate Data Reporting with Azure Functions and Power Automate
2 |
3 | **Level**: Intermediate
4 |
5 | # Introduction
6 |
7 | In this tutorial you'll learn how to migrate a local Node.js script to Azure Functions using Visual Studio Code so that data can be retrieved more easily for reporting purposes. To automate calling the API, you'll learn how to setup a Power Automate flow, call the Azure Function, and store the data in Excel Online.
8 |
9 | Here's an overview of the application solution. Power Automate is used to setup a recurring action that calls out to Azure Functions, retrieves JSON data, parses it, extracts the desired values, and stores the data in Excel Online (note that many other storage options could be chosen).
10 |
11 | 
12 |
13 | ### Pre-requisites
14 | - [Node](https://nodejs.org) - Node LTS
15 | - [git](https://learn.microsoft.com/devops/develop/git/install-and-set-up-git)
16 | - [Visual Studio Code](https://code.visualstudio.com/)
17 | - [Azure Functions Extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions)
18 | - [Azure subscription](https://azure.microsoft.com/free/search)
19 | - [Microsoft 365 developer tenant](https://developer.microsoft.com/microsoft-365/dev-program)
20 |
21 | ### Technologies used in this tutorial include
22 | - Node.js
23 | - Azure Functions
24 | - GitHub
25 | - Power Automate
26 | - VS Code
--------------------------------------------------------------------------------
/tutorials/docs/Build-Productivity-Apps-By-Using-Microsoft-Graph-Toolkit/index.md:
--------------------------------------------------------------------------------
1 | # Build Productivity Apps by using Microsoft Graph Toolkit
2 |
3 | **Level**: Beginner
4 |
5 | ## Introduction
6 |
7 | The One Productivity Hub tutorial shows you how to build a tab for viewing your calendar events, to-do tasks and files by using Microsoft Graph Toolkit components and TeamsFx Provider.
8 |
9 | 
10 |
11 |
12 |
13 | ### Pre-requisites
14 | - [NodeJS](https://nodejs.org/en/), fully tested on NodeJS 14, 16
15 | - A Microsoft 365 account. If you do not have Microsoft 365 account, apply one from [Microsoft 365 developer program](https://developer.microsoft.com/en-us/microsoft-365/dev-program)
16 | - Latest [Teams Toolkit Visual Studio Code Extension](https://aka.ms/teams-toolkit)
17 |
18 | ### Technologies used in this tutorial include
19 | - Azure Active Directory
20 | - Microsoft Graph Toolkit
21 | - TeamsFx
--------------------------------------------------------------------------------
/tutorials/docs/Take-A-Break-Reminder-App/02-Installing-Dependencies-From-Kit-Get-Started.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 2. Installing dependencies from the Kit Get Started
3 | sidebar_position: 1
4 | ---
5 |
6 | Again, if you are not coming from the previous workshop, **[you can download the source code of the project we will be working on in this workshop](https://github.com/glaucia86/kitstarter-msgraph-nextjs)**
7 |
8 | After downloading the source code, you should run the following command in the terminal:
9 |
10 | ```bash
11 | cd kitstarter-msgraph-nextjs
12 | ```
13 |
14 | ```bash
15 | npm install
16 | ```
17 |
18 | At the root of the project, create a file called `env.local` and fill in the following environment variables:
19 |
20 | ```env
21 | AZURE_AD_CLIENT_ID=
22 | AZURE_AD_CLIENT_SECRET=
23 | AZURE_AD_TENANT_ID=
24 | NEXTAUTH_SECRET= # Linux: `openssl rand -hex 32` or go to https://generate-secret.now.sh/32
25 | ```
26 |
27 | And finally to run the project, run the following command:
28 |
29 | ```bash
30 | npm run dev
31 | ```
32 |
33 | Open your browser and go to the following address: `http://localhost:3000`
34 |
35 | If everything is working correctly, we can move on to the next section.
36 |
37 |
--------------------------------------------------------------------------------
/tutorials/docs/Take-A-Break-Reminder-App/07-Next Steps-Conclusion.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 7. Next Steps & Final Words
3 | sidebar_position: 1
4 | ---
5 |
6 | We hope you enjoyed this workshop and learned something new! If you have any questions or comments, don't hesitate to reach out to us!
7 |
8 | If you want to learn more about Microsoft Graph, we have a lot of free courses and Learn Modules about it. Below you can see some interesting resources and links:
9 |
10 | - ✅ **[Microsoft Graph Fundalmentals](https://learn.microsoft.com/en-us/training/paths/m365-msgraph-fundamentals/)**
11 | - ✅ **[Access a user's calendar events in a JavaScript app with Microsoft Graph](https://learn.microsoft.com/en-us/training/modules/msgraph-access-user-events/)**
12 | - ✅ **[Show a user's emails in a JavaScript app with Microsoft Graph](https://learn.microsoft.com/en-us/training/modules/msgraph-show-user-emails/)**
13 | - ✅ **[Download and upload files in a JavaScript app with Microsoft Graph](https://learn.microsoft.com/en-us/training/modules/msgraph-manage-files/)**
14 | - ✅ **[Access user photo information by using Microsoft Graph](https://learn.microsoft.com/en-us/training/modules/msgraph-user-photo-information/)**
15 | - ✅ **[Configure a JavaScript application to retrieve Microsoft 365 data by using Microsoft Graph](https://learn.microsoft.com/en-us/training/modules/msgraph-javascript-app/)**
16 | - ✅ **[Build apps with Microsoft Graph – Associate](https://learn.microsoft.com/en-us/training/paths/m365-msgraph-associate/)**
17 |
18 | And, see you sooner! 😊
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/tutorials/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "docs-website",
3 | "version": "0.0.0",
4 | "private": true,
5 | "scripts": {
6 | "move-tutorials": "rimraf ../public/tutorials && mv build ../public/tutorials",
7 | "docusaurus": "docusaurus",
8 | "start": "docusaurus start",
9 | "build": "docusaurus build && npm run move-tutorials",
10 | "swizzle": "docusaurus swizzle",
11 | "deploy": "docusaurus deploy",
12 | "clear": "docusaurus clear",
13 | "serve": "docusaurus serve",
14 | "write-translations": "docusaurus write-translations",
15 | "write-heading-ids": "docusaurus write-heading-ids",
16 | "typecheck": "tsc"
17 | },
18 | "dependencies": {
19 | "@docusaurus/core": "^2.4.1",
20 | "@docusaurus/preset-classic": "^2.4.1",
21 | "@mdx-js/react": "^1.6.22",
22 | "clsx": "^1.2.1",
23 | "prism-react-renderer": "^1.3.5",
24 | "react": "^17.0.2",
25 | "react-dom": "^17.0.2"
26 | },
27 | "devDependencies": {
28 | "@docusaurus/module-type-aliases": "^2.4.1",
29 | "@tsconfig/docusaurus": "^1.0.6",
30 | "rimraf": "^3.0.2",
31 | "typescript": "^4.9.3"
32 | },
33 | "browserslist": {
34 | "production": [
35 | ">0.5%",
36 | "not dead",
37 | "not op_mini all"
38 | ],
39 | "development": [
40 | "last 1 chrome version",
41 | "last 1 firefox version",
42 | "last 1 safari version"
43 | ]
44 | },
45 | "engines": {
46 | "node": ">=16.14"
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/tutorials/sidebars.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Creating a sidebar enables you to:
3 | - create an ordered group of docs
4 | - render a sidebar for each doc of that group
5 | - provide next/previous navigation
6 |
7 | The sidebars can be generated from the filesystem, or explicitly defined here.
8 |
9 | Create as many sidebars as you want.
10 | */
11 |
12 | // @ts-check
13 |
14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
15 | const sidebars = {
16 | // By default, Docusaurus generates a sidebar from the docs folder structure
17 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
18 |
19 | // But you can create a sidebar manually
20 | /*
21 | tutorialSidebar: [
22 | 'intro',
23 | 'hello',
24 | {
25 | type: 'category',
26 | label: 'Tutorial',
27 | items: ['tutorial-basics/create-a-document'],
28 | },
29 | ],
30 | */
31 | };
32 |
33 | module.exports = sidebars;
34 |
--------------------------------------------------------------------------------
/tutorials/src/components/HomepageFeatures/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import clsx from 'clsx';
3 | import styles from './styles.module.css';
4 |
5 | type FeatureItem = {
6 | title: string;
7 | image?: string;
8 | Svg?: React.ComponentType>;
9 | description: JSX.Element;
10 | };
11 |
12 | const FeatureList: FeatureItem[] = [
13 | {
14 | title: 'Hands-On Learning',
15 | image: require('@site/static/img/hands-on-learning.png').default,
16 | description: (
17 | <>
18 | Hands-on tutorials show how services across the Microsoft Cloud can be integrated.
19 | >
20 | ),
21 | },
22 | {
23 | title: 'Step-by-Step Guidance',
24 | image: require('@site/static/img/step-by-step.png').default,
25 | description: (
26 | <>
27 | Step-by-step guidance helps you understand how to provision services and walks you through the end-to-end process.
28 | >
29 | ),
30 | },
31 | {
32 | title: 'Enhance Your Skills',
33 | image: require('@site/static/img/enhance-skills.png').default,
34 | description: (
35 | <>
36 | Take your Microsoft Cloud skills to the next level by learning more about service to service communication, deployment, security, and more.
37 | >
38 | ),
39 | },
40 | ];
41 |
42 | function Feature({title, image, Svg, description}: FeatureItem) {
43 | return (
44 |