How to set up single sign-on for developers (Windows Store apps using JavaScript and HTML)
Developers need to follow these steps to use single sign-on (SSO) mode.
What you need to know
Technologies
Prerequisites
- You should be familiar with JavaScript.
Instructions
Step 1: Use the operation that doesn't require the callbackUri parameter
Use the authenticateAsync function that doesn't expose the callbackUri parameter. Behind the scenes, the web authentication broker constructs the value of the callbackUri parameter itself by querying the app's package SID and appending it to the "ms-app://" string.
Step 2: Get your app's SID
Call the getCurrentApplicationCallbackUri method to get your app's SID for SSO. This is useful when building a parameter list to be sent to an online provider through the query string.
Step 3: Register your app with your online provider
You must register your "ms-app://" URI with your online provider.
Step 4: Prevent a dialog box from appearing to your user
When the app doesn't expect the provider to show any UI, use the WebAuthenticationOptions.silentMode flag to avoid a dialog box.
Remarks
You can find out what your "ms-app://" URI is by going to the Developer portal. Click the Manage your cloud services setting, and then find your app's SID under the Application Authentication tab of the Advanced Features.
Related topics
Troubleshooting web authentication problems
FAQ for Web Authentication Broker
Build date: 10/15/2012