Skip to content

Commit

Permalink
[Outlook] (NAA) remove preview (#881)
Browse files Browse the repository at this point in the history
* Update for GA of NAA

* update for GA of NAA

* fix id
  • Loading branch information
davidchesnut authored Nov 6, 2024
1 parent 508d853 commit d670692
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 46 deletions.
10 changes: 3 additions & 7 deletions Samples/auth/Outlook-Add-in-SSO-NAA-IE/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,24 @@ extensions:
description: "This sample shows how to implement SSO in an Outlook add-in by using nested app authentication with a fallback that supports Internet Explorer."
---

# Outlook add-in with SSO using nested app authentication including Internet Explorer fallback (preview)
# Outlook add-in with SSO using nested app authentication including Internet Explorer fallback

## Summary

This sample shows how to use MSAL.js nested app authentication (NAA) in an Outlook Add-in to access Microsoft Graph APIs for the signed-in user. The sample displays the signed-in user's name and email. It also retrieves file names from the user's Microsoft OneDrive account. This sample includes an auth fallback when NAA isn't available, which also supports [Outlook versions that still use Internet Explorer 11](https://learn.microsoft.com/office/dev/add-ins/concepts/browsers-used-by-office-web-add-ins). `@azure/msal-browser` version 2.x is used to support Internet Explorer. Version 3.x is the first version with NAA support. This sample uses both versions of the library for maximum browser support.

> [!IMPORTANT]
> Nested app authentication is currently in preview. To try this feature, you need to join the [Microsoft 365 Insider Program](https://insider.microsoft365.com/join) and choose **Current Channel (Preview)**. Don't use NAA in production add-ins. We invite you to try out NAA in test or development environments and welcome feedback on your experience through GitHub (see https://github.com/OfficeDev/office-js/issues).
## Features

- Use MSAL.js NAA to get an access token to call Microsoft Graph APIs.
- Use MSAL.js NAA to get information about the user signed in to Office.

## Applies to

For a list of supported platforms, see [NAA supported accounts and hosts](https://learn.microsoft.com/office/dev/add-ins/develop/enable-nested-app-authentication-in-your-add-in#naa-supported-accounts-and-hosts).
- Outlook on Windows (new and classic), Mac, mobile, and on the web.

## Prerequisites

- Office connected to a Microsoft 365 subscription (including Office on the web).
- You need to join the [Microsoft 365 Insider Program](https://insider.microsoft365.com/join) to use the NAA preview features. Choose the **Current Channel (Preview)** insider level.
- [Node.js](https://nodejs.org/) version 16 or greater.
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) version 8 or greater.

Expand Down Expand Up @@ -140,4 +136,4 @@ Copyright (c) 2024 Microsoft Corporation. All rights reserved.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

<img src="https://pnptelemetry.azurewebsites.net/pnp-officeaddins/samples/outlook-add-in-sso-naa" />
<img src="https://pnptelemetry.azurewebsites.net/pnp-officeaddins/samples/outlook-add-in-sso-naa-ie" />
4 changes: 2 additions & 2 deletions Samples/auth/Outlook-Add-in-SSO-NAA-IE/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "outlook-add-in-sso-naa-ie",
"reponame": "office-add-in-samples",
"source": "officedev",
"title": "Outlook add-in with SSO using nested app authentication including Internet Explorer fallback (preview)",
"title": "Outlook add-in with SSO using nested app authentication including Internet Explorer fallback",
"shortDescription": "This sample shows how to implement SSO in an Outlook add-in by using nested app authentication with a fallback that supports Internet Explorer.",
"url": "https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/auth/Outlook-Add-in-SSO-NAA",
"longDescription": [
Expand All @@ -28,7 +28,7 @@
],
"references": [
{
"name": "Enable SSO in an Office Add-in using nested app authentication including Internet Explorer compatible fallback (preview)",
"name": "Enable SSO in an Office Add-in using nested app authentication including Internet Explorer compatible fallback",
"description": "Learn how to enable SSO in an Office Add-in using nested app authentication including Internet Explorer compatible fallback.",
"url": "https://learn.microsoft.com/office/dev/add-ins/develop/enable-nested-app-authentication-in-your-add-in"
}
Expand Down
13 changes: 2 additions & 11 deletions Samples/auth/Outlook-Add-in-SSO-NAA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,24 @@ extensions:
description: "This sample shows how to implement SSO in an Outlook add-in by using nested app authentication."
---

# Outlook add-in with SSO using nested app authentication (preview)
# Outlook add-in with SSO using nested app authentication

## Summary

This sample shows how to use MSAL.js nested app authentication (NAA) in an Outlook Add-in to access Microsoft Graph APIs for the signed in user. The sample displays the signed in user's name and email. It also inserts the names of files from the user's Microsoft OneDrive account into a new message body.

> [!IMPORTANT]
> Nested app authentication is currently in preview. To try this feature, you need to join the [Microsoft 365 Insider Program](https://insider.microsoft365.com/join) and choose **Current Channel (Preview)**. Don't use NAA in production add-ins. We invite you to try out NAA in test or development environments and welcome feedback on your experience through GitHub (see https://github.com/OfficeDev/office-js/issues).
## Features

- Use MSAL.js NAA to get an access token to call Microsoft Graph APIs.
- Fall back to using the Office dialog API for auth when NAA unavailable.

## Applies to

- Outlook (Current Channel (preview) for classic Outlook only, new Outlook coming soon).
- Outlook on the web.

For more information on supported platforms, see [NAA supported accounts and hosts](https://learn.microsoft.com/office/dev/add-ins/develop/enable-nested-app-authentication-in-your-add-in#naa-supported-accounts-and-hosts).
- Outlook on Windows (new and classic), Mac, mobile, and on the web.

## Prerequisites

- Office connected to a Microsoft 365 subscription (including Office on the web).
- You need to join the [Microsoft 365 Insider Program](https://insider.microsoft365.com/join) to use the NAA preview features. Choose the **Current Channel (Preview)** insider level.
- [Node.js](https://nodejs.org/) version 16 or greater.
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) version 8 or greater.

Expand Down Expand Up @@ -134,8 +127,6 @@ If you find a security issue with our libraries or services, report the issue to
## More resources
- NAA public preview blog: https://aka.ms/NAApreviewblog
- [Updates on deprecating legacy Exchange Online tokens for Outlook add-ins](https://devblogs.microsoft.com/microsoft365dev/updates-on-deprecating-legacy-exchange-online-tokens-for-outlook-add-ins/?commentid=1131)
- NAA docs to get started: https://aka.ms/NAAdocs
- NAA FAQ: https://aka.ms/NAAFAQ
- NAA Word, Excel, and PowerPoint sample: https://aka.ms/NAAsampleOffice
Expand Down
4 changes: 2 additions & 2 deletions Samples/auth/Outlook-Add-in-SSO-NAA/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "outlook-add-in-sso-naa",
"reponame": "office-add-in-samples",
"source": "officedev",
"title": "Outlook add-in with SSO using nested app authentication (preview)",
"title": "Outlook add-in with SSO using nested app authentication",
"shortDescription": "This sample shows how to implement SSO in an Outlook add-in by using nested app authentication.",
"url": "https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/auth/Outlook-Add-in-SSO-NAA",
"longDescription": [
Expand Down Expand Up @@ -32,7 +32,7 @@
],
"references": [
{
"name": "Enable SSO in an Office Add-in using nested app authentication (preview)",
"name": "Enable SSO in an Office Add-in using nested app authentication",
"description": "Learn how to enable SSO in an Office Add-in using nested app authentication.",
"url": "https://learn.microsoft.com/office/dev/add-ins/develop/enable-nested-app-authentication-in-your-add-in"
}
Expand Down
18 changes: 9 additions & 9 deletions Samples/auth/Outlook-Add-in-SSO-NAA/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Samples/auth/Outlook-Add-in-SSO-NAA/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
"watch": "webpack --mode development --watch"
},
"dependencies": {
"@azure/msal-browser": "^3.24.0",
"@azure/msal-browser": "^3.26.1",
"core-js": "^3.38.1",
"regenerator-runtime": "^0.14.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-typescript": "^7.24.7",
"@types/office-js-preview": "^1.0.499",
"@types/office-js": "^1.0.441",
"@types/office-runtime": "^1.0.35",
"acorn": "^8.12.1",
"babel-loader": "^9.1.3",
Expand Down
13 changes: 2 additions & 11 deletions Samples/auth/Outlook-Event-SSO-NAA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ extensions:
description: "This sample shows how to implement SSO in an event in an Outlook add-in by using nested app authentication."
---

# Implement SSO in events in an Outlook add-in using nested app authentication (preview)
# Implement SSO in events in an Outlook add-in using nested app authentication

## Summary

This sample demonstrates how to use single sign-on (SSO) in an Outlook add-in event using the Microsoft Authentication Library for JavaScript (MSAL.js) and nested app authentication (NAA) to access Microsoft Graph APIs for the authenticated user. The sample displays the signed-in user's name as a signature in the body of a new email or calendar item.

> [!IMPORTANT]
> Nested app authentication is currently in preview. To try this feature, join the [Microsoft 365 Insider Program](https://insider.microsoft365.com/join) and choose **Beta Channel**. Don't use NAA in production add-ins. We invite you to try out NAA in test or development environments and welcome feedback on your experience through GitHub (see https://github.com/OfficeDev/office-js/issues).
## Features

- Use MSAL.js NAA to get an access token for the signed in user to call Microsoft Graph APIs.
Expand All @@ -31,15 +28,11 @@ This sample demonstrates how to use single sign-on (SSO) in an Outlook add-in ev

## Applies to

- Outlook (Beta Channel for classic Outlook only, new Outlook coming soon).
- Outlook on the web.

For more information on supported platforms, see [NAA supported accounts and hosts](https://learn.microsoft.com/office/dev/add-ins/develop/enable-nested-app-authentication-in-your-add-in#naa-supported-accounts-and-hosts).
- Outlook on Windows (new and classic), Mac, mobile, and on the web.

## Prerequisites

- Office connected to a Microsoft 365 subscription (including Office on the web).
- You need to join the [Microsoft 365 Insider Program](https://insider.microsoft365.com/join) to use the NAA preview features. Choose the **Beta Channel** insider level.
- [Node.js](https://nodejs.org/) version 16 or greater.
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) version 8 or greater.

Expand Down Expand Up @@ -119,8 +112,6 @@ If you find a security issue with our libraries or services, report the issue to

## More resources

- NAA public preview blog: https://aka.ms/NAApreviewblog
- [Updates on deprecating legacy Exchange Online tokens for Outlook add-ins](https://devblogs.microsoft.com/microsoft365dev/updates-on-deprecating-legacy-exchange-online-tokens-for-outlook-add-ins/?commentid=1131)
- NAA docs to get started: https://aka.ms/NAAdocs
- NAA FAQ: https://aka.ms/NAAFAQ
- NAA Outlook sample: https://aka.ms/NAAsampleOutlook
Expand Down
4 changes: 2 additions & 2 deletions Samples/auth/Outlook-Event-SSO-NAA/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "outlook-event-sso-naa",
"reponame": "office-add-in-samples",
"source": "officedev",
"title": "Outlook event-based add-in using SSO with nested app authentication (preview)",
"title": "Outlook event-based add-in using SSO with nested app authentication",
"shortDescription": "This sample shows how to implement SSO in an Outlook event-based add-in.",
"url": "https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/auth/Outlook-Add-in-SSO-NAA",
"longDescription": [
Expand Down Expand Up @@ -32,7 +32,7 @@
],
"references": [
{
"name": "Use SSO in events in an Outlook add-in using nested app authentication (preview)",
"name": "Use SSO in events in an Outlook add-in using nested app authentication",
"description": "This sample shows how to implement SSO in an event in an Outlook add-in by using nested app authentication.",
"url": "https://learn.microsoft.com/office/dev/add-ins/develop/enable-nested-app-authentication-in-your-add-in"
}
Expand Down

0 comments on commit d670692

Please sign in to comment.