You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/teams-sso-node/readme.md
+26-34Lines changed: 26 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,11 @@ This sample implements both a `GET` and `POST` api for exchanging the Microsoft
7
7
8
8
You will need:
9
9
10
-
1. A global administrator account for an Office 365 tenant. Testing in a production tenant is not recommended! You can get a free tenant for development use by signing up for the [Office 365 Developer Program](https://developer.microsoft.com/en-us/microsoft-365/dev-program).
10
+
1. A global administrator account for an Office 365 tenant. Testing in a production tenant is not recommended! You can get a free tenant for development use by signing up for the [Office 365 Developer Program](https://developer.microsoft.com/microsoft-365/dev-program).
11
11
12
12
1. To test locally, [NodeJS](https://nodejs.org/en/download/) must be installed on your development machine.
13
13
14
-
1. To test locally, you need [Ngrok](https://ngrok.com/) installed on your development machine.
15
-
Make sure you've downloaded and installed Ngrok on your local machine. ngrok will tunnel requests from the Internet to your local computer and terminate the SSL connection from Teams.
14
+
1. To test locally, you will need to tunnel requests from the internet to your local computer. You can use [ngrok](https://ngrok.com/) for this.
16
15
17
16
> NOTE: The free ngrok plan will generate a new URL every time you run it, which requires you to update your Azure AD registration, the Teams app manifest, and the project configuration. A paid account with a permanent ngrok URL is recommended.
18
17
@@ -55,7 +54,7 @@ Make sure you've downloaded and installed Ngrok on your local machine. ngrok wil
55
54
> yarn start
56
55
```
57
56
58
-
1. Open a new terminal and run Ngrok to expose your local web server via a public URL.
57
+
1. Open a new terminal and run the application to expose your local web server via a public URL. If you're using ngrok, you can do:
59
58
60
59
```bash
61
60
> ngrok http 3000
@@ -80,7 +79,7 @@ Your tab needs to run as a registered Azure AD application to obtain an access t
80
79
81
80
- Set **Name** to `Node.js Teams SSO` (or a name of your choice).
82
81
- Set **Supported account types** to **Accounts in any organizational directory and personal Microsoft accounts**.
83
-
- Under **Redirect URI**, set the first drop-down to `Single Page Application` and set the value to the ngrok url + `/auth.html`. Ex: `https://mgtsso.ngrok.io/auth.html`.
82
+
- Under **Redirect URI**, set the first drop-down to `Single Page Application` and set the value to the application's public url + `/auth.html`. Ex: `https://mgtsso.example.com/auth.html`.
84
83
85
84
1. From the app overview page, copy the value of the **Application (client) ID** for later. You will need it for the following steps. You will use this value in the `index.html` and `.env` files
86
85
@@ -102,7 +101,7 @@ Your tab needs to run as a registered Azure AD application to obtain an access t
102
101
103
102
- To pre-consent as an admin, select **Grant admin consent**, then select **Yes**
104
103
105
-
1. Navigate to **Expose an API** under **Manage**. On the top of the page next to `Application ID URI` select **Set**. This generates an API in the form of: `api://{AppID}`. Update it to add your subdomain, ex: `api://mgtsso.ngrok.io/{appID}`
104
+
1. Navigate to **Expose an API** under **Manage**. On the top of the page next to `Application ID URI` select **Set**. This generates an API in the form of: `api://{AppID}`. Update it to add your subdomain, ex: `api://mgtsso.example.com/{appID}`
106
105
107
106
1. On the same page, select **Add a scope**. Fill in the fields as follows and select **Add scope**.
108
107
@@ -114,57 +113,50 @@ Your tab needs to run as a registered Azure AD application to obtain an access t
114
113
- User consent description: `Enable Teams to call this app’s APIs with the same rights as the user.`
115
114
- State: **Enabled**
116
115
117
-
Your API URL should look like this: `api://mgtsso.ngrok.io/{appID}/access_as_user`.
116
+
Your API URL should look like this: `api://mgtsso.example.com/{appID}/access_as_user`.
118
117
119
118
1. Next, add two client applications. This is forthe Teams desktop/mobile clients and the web client. Under the **Authorized client applications** section, select **Add a client application**. Fillin the Client ID and selectthe scope we created. Then select**Add application**. Do this for the followings Ids
120
119
121
120
- 5e3ce6c0-2b1f-4285-8d4b-75ee78787346
122
121
- 1fec8e78-bce4-4aaf-ab1b-5451cc387264
123
122
## Creating a Teams App
124
123
125
-
Now you can use [App Studio](https://docs.microsoft.com/en-us/microsoftteams/platform/get-started/get-started-app-studio) app from within the Microsoft Teams client to help create your app manifest. If you do not have App studio installedinTeams, selectApps Store App at the bottom-left corner of the Teams app, and search forApp Studio. Once you find the tile, select it and choose installin the pop-up window dialog box.
124
+
Now you can use the [Developer Portal forTeams](https://learn.microsoft.com/microsoftteams/platform/concepts/build-and-test/teams-developer-portal) to configure, distribute and manage your application. You can access the [Developer Portal for Teamsina web browser](https://dev.teams.microsoft.com/) or as a [Teams App](https://teams.microsoft.com/l/app/14072831-8a2a-4f76-9294-057bf0b42a68).
126
125
127
-
1. Open App Studio and selectthe**Manifest editor**tab.
126
+
You can also use the [Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) in**Visual Studio Code**to quickly create and deploy your Teams app.
128
127
129
-
1. Choose the **Create a new app** tile. This will bring you into the **App Details** section.
128
+
To use the Developer Portal for Teams:
130
129
131
-
1. Under **App names** fill in the short name and full name as you wish
130
+
1. Open [Developer Portal for Teams](https://dev.teams.microsoft.com/).
132
131
133
-
1. Under **Identification** press **Generate** to generate an App Id (this is only forthe Teams App). Then fillin
134
-
- **Package name:**`com.mgt.teamsSsoSample`
135
-
- **Version:**`1.0.0`
132
+
2. Choose **Apps** from the left sidebar menu.
136
133
137
-
1. Under **Descriptions**fill inthe short and full description as you wish
134
+
3. Click on **+ New app**from the options at the top left of the screen. This will open a modal where you enter an application name. Click **Add** to save it.
138
135
139
-
1. Under **Developer information** section fill out your details
136
+
4. Fill in the remaining required basic information of the application. Required fields have an asterik (*) after their titles.
137
+
>**Note**: The application ID is automatically created for you when you add the new application.
d. For **App urls**, use `https://mgtsso.example.com/privacy`for**Privacy policy** and `https://mgtsso.example.com/terms`for**Terms of use**.
153
146
154
-
1. In the left navigation, in the **Finish** section, select**Domains and permissions**
147
+
e. For **Application (client) ID**, fill in the client ID you got when you registered in AAD.
155
148
156
-
1. Under**AAD App ID** enter the client id from your AAD App registration
149
+
f. Click**Save**.
157
150
158
-
1. Under **Single-Sign-On**enter the API URL we set during the AAD App registration process.
159
-
- Ex: `api://mgtsso.ngrok.io/{Your App Id}`
151
+
5. Click on **App features**under **Configure** to specify the features you want to include foryour application. Select **Personal app** feature. Fill the name of the appin the **Name** section and the application URL in the **Content URL** section. Select the **Context** as **personalTab**. Click **Confirm** to save.
152
+
>**Note**: This is the tab that will appear on the application when it is launched.
160
153
161
-
1. From the left nav **Finish** section, select**Test and distribute**. There you can download your app package as a zip file.
154
+
6. Click **Single sign-on** under **Configure**. Enter the API URL you set during the AAD App registration process. Click **Save**.
Copy file name to clipboardExpand all lines: samples/teams-tab/readme.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,4 +22,4 @@ For the quickest way to run this sample, you will need:
22
22
23
23
Ex: `https://b5d9404b.ngrok.io/auth.html`
24
24
25
-
5. Now you can use [App Studio](https://docs.microsoft.com/en-us/microsoftteams/platform/get-started/get-started-app-studio) to quickly develop your app manifest for Microsoft Teams and test the app. Use the ngrok url for the tab url.
25
+
5. Now you can use the [Developer Portal forTeams](https://learn.microsoft.com/microsoftteams/platform/concepts/build-and-test/teams-developer-portal) to configure, distribute and manage your application. You can access the [Developer Portal for Teamsin a web browser](https://dev.teams.microsoft.com/) or as a [Teams App](https://teams.microsoft.com/l/app/14072831-8a2a-4f76-9294-057bf0b42a68). You can also use the [Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) in**Visual Studio Code** to quickly create and deploy your Teams app.
0 commit comments