Name: Outlook-Add-in-JavaScript-UseIdentityToken
Owner: Office Developer
Description: Shows how to use a client token from the Exchange server to provide authentication for users of a mail add-in for Outlook.
Created: 2015-08-14 19:52:42.0
Updated: 2017-05-15 05:50:00.0
Pushed: 2018-01-31 20:28:37.0
Homepage: null
Size: 960
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Table of contents
This sample shows how to use a client token from the Exchange server to provide authentication for users of your mail add-in for Outlook.
This sample requires the following:
The sample solution contains the following key files:
UseIdentityToken project
`UseIdentityToken.xml
`: The manifest file for the mail add-in for Outlook.UseIdentityTokenWeb project
`AppRead/Home/Home.html
`: The HTML user interface for the add-in.`AppRead/Home/Home.js
`: The logic that handles requesting and using the identity token.UseIdentityTokenService project
`App_Start/WebApiConfig.cs
`: Binds the default routing for the Web API service.`Controllers/IdentityTokenController.cs
`: The service object that provides the business logic for the sample Web API service.`Models/ServiceRequest.cs
`: The object that represents a web request. The contents of the object are created from a JSON request object sent from the add-in.`Models/ServiceResponse.cs
`: The object that represents a response from the web service. The contents of the object are serialized to a JSON object when they are sent back to the add-in.This sample shows how to use a client token from the Exchange server to provide authentication for users of your mail add-in. The Exchange server issues a token that is unique to the mailbox
on the server. You can use this token to associate a mailbox with services that you provide to a mail add-in.
The sample is divided in two parts:
The web service uses the following steps to process the token:
This sample does not validate the service user name and password in any way. A credential request is considered valid if it contains both a user name and password. Credentials do not expire from the cache in this sample; however, all the cached identifiers and user names are lost when you stop running the sample application.
This sample requires a valid server certificate on the Exchange server. If the Exchange server is using its default self-signed certificate, you will need to add the certificate to your local trusted certificate store. You can find instructions for exporting and installing a self-signed certificate on TechNet.
The add-in will be activated on any email message in the user's Inbox. You can make it easier to test the add-in by sending one or more email messages to your test account before you run the sample.
If you have another email message in your Inbox, you can switch to that email message, show the Use Identity Token add-in, and click the button again. The response will be returned from the server without a request for a user name or password.
You might encounter following issues when you use Outlook Web App to test a mail add-in for Outlook:
If the add-in loads but does not run, try to build the solution in Visual Studio (Build > Build Solution). Check the Error List for missing dependencies and add them as needed.
Copyright (c) 2015 Microsoft. All rights reserved.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.