Skip to content

Commit 6cb4e33

Browse files
2 parents e7d45a3 + d60320c commit 6cb4e33

File tree

594 files changed

+25319
-3136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

594 files changed

+25319
-3136
lines changed

.openpublishing.redirection.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,11 @@
10951095
"redirect_url": "/azure/cognitive-services/Speech-Service/how-to-customize-acoustic-models",
10961096
"redirect_document_id": true
10971097
},
1098+
{
1099+
"source_path": "articles/cognitive-services/Speech-Service/speech-devices-sdk-qsg.md",
1100+
"redirect_url": "/azure/cognitive-services/Speech-Service/speech-devices-sdk-android-quickstart",
1101+
"redirect_document_id": true
1102+
},
10981103
{
10991104
"source_path": "articles/active-directory/active-directory-licensing-ps-examples.md",
11001105
"redirect_url": "/azure/active-directory/users-groups-roles/licensing-ps-examples",
@@ -33283,6 +33288,11 @@
3328333288
"redirect_url": "/azure/machine-learning/desktop-workbench/quickstart-installation",
3328433289
"redirect_document_id": true
3328533290
},
33291+
{
33292+
"source_path": "articles/machine-learning/service/how-to-build-deploy-onnx.md",
33293+
"redirect_url": "/azure/machine-learning/service/concept-onnx",
33294+
"redirect_document_id": false
33295+
},
3328633296
{
3328733297
"source_path": "articles/iot-hub/iot-hub-raspberry-pi-kit-python-get-started.md",
3328833298
"redirect_url": "/azure/iot-hub/iot-hub-get-started-physical",
@@ -37073,6 +37083,31 @@
3707337083
"redirect_url": "/azure/cognitive-services/QnAMaker/quickstarts/create-publish-knowledge-base",
3707437084
"redirect_document_id": true
3707537085
},
37086+
{
37087+
"source_path": "articles/cognitive-services/Speech-Service/prepare-transcription.md",
37088+
"redirect_url": "/azure/cognitive-services/speech-service/how-to-custom-speech-human-labeled-transcriptions",
37089+
"redirect_document_id": true
37090+
},
37091+
{
37092+
"source_path": "articles/cognitive-services/Speech-Service/how-to-customize-acoustic-models.md",
37093+
"redirect_url": "/azure/cognitive-services/speech-service/how-to-custom-speech-train-model",
37094+
"redirect_document_id": true
37095+
},
37096+
{
37097+
"source_path": "articles/cognitive-services/Speech-Service/how-to-customize-language-model.md",
37098+
"redirect_url": "/azure/cognitive-services/speech-service/how-to-custom-speech-train-model",
37099+
"redirect_document_id": false
37100+
},
37101+
{
37102+
"source_path": "articles/cognitive-services/Speech-Service/how-to-customize-pronunciation.md",
37103+
"redirect_url": "/azure/cognitive-services/speech-service/how-to-custom-speech-train-model",
37104+
"redirect_document_id": false
37105+
},
37106+
{
37107+
"source_path": "articles/cognitive-services/Speech-Service/how-to-create-custom-endpoint.md",
37108+
"redirect_url": "/azure/cognitive-services/speech-service/how-to-custom-speech-deploy-model",
37109+
"redirect_document_id": true
37110+
},
3707637111
{
3707737112
"source_path": "articles/virtual-machines/linux/prepay-rhel-software-charges.md",
3707837113
"redirect_url": "/azure/virtual-machines/linux/prepay-suse-software-charges",

articles/active-directory/develop/quickstart-v2-javascript.md

Lines changed: 74 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You will need the following setup for this quickstart:
4747
>
4848
> 1. Sign in to the [Azure portal](https://portal.azure.com) using either a work or school account, or a personal Microsoft account.
4949
> 1. If your account gives you access to more than one tenant, select your account in the top right corner, and set your portal session to the desired Azure AD tenant.
50-
> 1. Go to the new [Azure portal - App registrations](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/applicationsListBlade/quickStartType/JavascriptSpaQuickstartPage/sourceType/docs) pane.
50+
> 1. Go to the new [Azure portal - App registrations](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade/quickStartType/JavascriptSpaQuickstartPage/sourceType/docs) pane.
5151
> 1. Enter a name for your application and click **Register**.
5252
> 1. Follow the instructions to download and automatically configure your new application for you in one click.
5353
>
@@ -79,27 +79,32 @@ You will need the following setup for this quickstart:
7979
#### Step 2: Download the project
8080

8181
You can choose one of these options suitable to your development environment.
82-
* [Download the core project files - for a web server, such as Node.js](https://github.com/Azure-Samples/active-directory-javascript-graphapi-v2/archive/quickstart.zip)
83-
* [Download the Visual Studio project](https://github.com/Azure-Samples/active-directory-javascript-graphapi-v2/archive/vsquickstart.zip)
82+
* [Download the core project files](https://github.com/Azure-Samples/active-directory-javascript-graphapi-v2/archive/quickstart.zip), to run with a web server using Node.js. To open the files, use an editor like [Visual Studio Code](https://code.visualstudio.com/).
83+
84+
* (Optional) [Download the Visual Studio project](https://github.com/Azure-Samples/active-directory-javascript-graphapi-v2/archive/vsquickstart.zip), to run with the IIS server. Extract the zip file to a local folder, for example, **C:\Azure-Samples**.
85+
8486

85-
Extract the zip file to a local folder, for example, **C:\Azure-Samples**.
86-
To open the files in the folder, use an editor like [Visual Studio Code](https://code.visualstudio.com/).
8787

8888
#### Step 3: Configure your JavaScript app
8989

9090
> [!div renderon="docs"]
91-
> Under the folder *JavaScriptSPA*, edit `index.html` and set the `clientID` and `authority` values under `applicationConfig`.
91+
> Under the folder *JavaScriptSPA*, edit `index.html` and set the `clientID` and `authority` values under `msalConfig`.
9292
9393
> [!div class="sxs-lookup" renderon="portal"]
94-
> Under the folder *JavaScriptSPA*, edit `index.html` and replace `applicationConfig` with:
94+
> Under the folder *JavaScriptSPA*, edit `index.html` and replace `msalConfig` with:
9595
9696
```javascript
97-
var applicationConfig = {
98-
clientID: "Enter_the_Application_Id_here",
99-
authority: "https://login.microsoftonline.com/Enter_the_Tenant_Info_Here",
100-
graphScopes: ["user.read"],
101-
graphEndpoint: "https://graph.microsoft.com/v1.0/me"
97+
var msalConfig = {
98+
auth: {
99+
clientId: "Enter_the_Application_Id_here",
100+
authority: "https://login.microsoftonline.com/Enter_the_Tenant_Info_Here"
101+
},
102+
cache: {
103+
cacheLocation: "localStorage",
104+
storeAuthStateInCookie: true
105+
}
102106
};
107+
103108
```
104109
> [!div renderon="docs"]
105110
>
@@ -108,10 +113,11 @@ var applicationConfig = {
108113
> - `Enter_the_Tenant_Info_Here` - is set to one of the following options:
109114
> - If your application supports **Accounts in this organizational directory**, replace this value with the **Tenant Id** or **Tenant name** (for example, contoso.microsoft.com)
110115
> - If your application supports **Accounts in any organizational directory**, replace this value with `organizations`
111-
> - If your application supports **Accounts in any organizational directory and personal Microsoft accounts**, replace this value with `common`
116+
> - If your application supports **Accounts in any organizational directory and personal Microsoft accounts**, replace this value with `common`. To restrict support to *Personal Microsoft accounts only*, replace this value with `consumers`.
112117
>
113118
> > [!TIP]
114119
> > To find the values of **Application (client) ID**, **Directory (tenant) ID**, and **Supported account types**, go to the app's **Overview** page in the Azure portal.
120+
>
115121
116122
#### Step 4: Run the project
117123

@@ -139,43 +145,65 @@ After the browser loads the application, click **Sign In**. The first time that
139145
MSAL is the library used to sign in users and request tokens used to access an API protected by Microsoft identity platform. The quickstart's *index.html* contains a reference to the library:
140146
141147
```html
142-
<script src="https://secure.aadcdn.microsoftonline-p.com/lib/0.2.4/js/msal.min.js"></script>
148+
<script src="https://secure.aadcdn.microsoftonline-p.com/lib/1.0.0-preview.4/js/msal.min.js"></script>
143149
```
150+
> [!TIP]
151+
> You can replace the version above with the latest released version under [MSAL.js releases](https://github.com/AzureAD/microsoft-authentication-library-for-js/releases).
152+
144153

145-
Alternatively, if you have Node installed, you can download it through npm:
154+
Alternatively, if you have Node installed, you can download the latest preview version through npm:
146155

147156
```batch
148-
npm install msal
157+
npm install msal@preview
149158
```
150159

151160
### MSAL initialization
152161

153162
The quickstart code also shows how to initialize the library:
154163

155164
```javascript
156-
var myMSALObj = new Msal.UserAgentApplication(applicationConfig.clientID, applicationConfig.authority, acquireTokenRedirectCallBack, {storeAuthStateInCookie: true, cacheLocation: "localStorage"});
165+
var msalConfig = {
166+
auth: {
167+
clientId: "Enter_the_Application_Id_here",
168+
authority: "https://login.microsoftonline.com/Enter_the_Tenant_Info_Here"
169+
},
170+
cache: {
171+
cacheLocation: "localStorage",
172+
storeAuthStateInCookie: true
173+
}
174+
};
175+
176+
var myMSALObj = new Msal.UserAgentApplication(msalConfig);
157177
```
158178

159179
> |Where | |
160180
> |---------|---------|
161181
> |`ClientId` |Application ID from the application registered in the Azure portal|
162-
> |`authority` |It is the authority URL. Passing *null* sets the default authority to `https://login.microsoftonline.com/common`. If your app is single-tenant (targeting accounts in one directory only), set this value to `https://login.microsoftonline.com/<tenant name or ID>`|
163-
> |`tokenReceivedCallback`| Callback method called after the authentication redirects back to the app. Here, `acquireTokenRedirectCallBack` is passed. This is null if using loginPopup.|
164-
> |`options` |A collection of optional parameters. In this case `storeAuthStateInCookie` and `cacheLocation` are optional configuration. See the [wiki](https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options) for more details on the options. |
182+
> |`authority` | (Optional) It is the authority URL as described in the configuration section above to support account types. The default authority is `https://login.microsoftonline.com/common`. |
183+
> |`cacheLocation` | (Optional) This sets the browser storage for the auth state. The default is sessionStorage. |
184+
> |`storeAuthStateInCookie` | (Optional) The library will store the auth request state required for validation of the auth flows in the browser cookies. This is set for IE and Edge browsers to mitigate certain [known issues](https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/Known-issues-on-IE-and-Edge-Browser#issues). |
185+
186+
See the [wiki](https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options) for more details on the configurable options available.
165187

166188
### Sign in users
167189

168190
The following code snippet shows how to sign in users:
169191

170192
```javascript
171-
myMSALObj.loginPopup(applicationConfig.graphScopes).then(function (idToken) {
172-
//Callback code here
173-
})
193+
var request = {
194+
scopes: ["user.read"]
195+
};
196+
197+
myMSALObj.loginPopup(request).then(function (loginResponse) {
198+
//Login Success callback code here
199+
}).catch(function (error) {
200+
console.log(error);
201+
});
174202
```
175203

176204
> |Where | |
177205
> |---------|---------|
178-
> | `scopes` | (Optional) Contains scopes being requested for user consent at login time. For example, `[ "user.read" ]` for Microsoft Graph or `[ "<Application ID URL>/scope" ]` for custom Web APIs ( that is, `api://<Application ID>/access_as_user` ). Here, `applicationConfig.graphScopes` is passed. |
206+
> | `scopes` | (Optional) Contains scopes being requested for user consent at login time. For example, `[ "user.read" ]` for Microsoft Graph or `[ "<Application ID URL>/scope" ]` for custom Web APIs ( that is, `api://<Application ID>/access_as_user` ). |
179207
180208
> [!TIP]
181209
> Alternatively, you may want to use the `loginRedirect` method to redirect the current page to the sign-in page instead of a popup window.
@@ -189,14 +217,21 @@ MSAL has three methods used to acquire tokens: `acquireTokenRedirect`, `acquireT
189217
The `acquireTokenSilent` method handles token acquisitions and renewal without any user interaction. After the `loginRedirect` or `loginPopup` method is executed for the first time, `acquireTokenSilent` is the method commonly used to obtain tokens that are used to access protected resources for subsequent calls. Calls to request or renew tokens are made silently.
190218

191219
```javascript
192-
myMSALObj.acquireTokenSilent(applicationConfig.graphScopes).then(function (accessToken) {
220+
var request = {
221+
scopes: ["user.read"]
222+
};
223+
224+
myMSALObj.acquireTokenSilent(request).then(function (tokenResponse) {
193225
// Callback code here
194-
})
226+
console.log(tokenResponse.accessToken);
227+
}).catch(function (error) {
228+
console.log(error);
229+
});
195230
```
196231

197232
> |Where | |
198233
> |---------|---------|
199-
> | `scopes` | Contains scopes being requested to be returned in the access token for API. For example, `[ "user.read" ]` for Microsoft Graph or `[ "<Application ID URL>/scope" ]` for custom Web APIs (that is, `api://<Application ID>/access_as_user`). Here, `applicationConfig.graphScopes` is passed.|
234+
> | `scopes` | Contains scopes being requested to be returned in the access token for API. For example, `[ "user.read" ]` for Microsoft Graph or `[ "<Application ID URL>/scope" ]` for custom Web APIs (that is, `api://<Application ID>/access_as_user`).|
200235
201236
#### Get a user token interactively
202237

@@ -205,18 +240,24 @@ There are situations where you need to force users to interact with Microsoft id
205240
* Your application is requesting access to additional resource scopes that the user needs to consent to
206241
* Two factor authentication is required
207242

208-
The usual recommended pattern for most applications is to call `acquireTokenSilent` first, then catch the exception and then call `acquireTokenRedirect` (or `acquireTokenPopup`) to start an interactive request.
243+
The usual recommended pattern for most applications is to call `acquireTokenSilent` first, then catch the exception and then call `acquireTokenPopup` (or `acquireTokenRedirect`) to start an interactive request.
209244

210-
Calling the `acquireTokenPopup(scope)` results in a popup window to sign in (or `acquireTokenRedirect(scope)` results in redirecting users to the Microsoft identity platform endpoint) where users need to interact by either confirming their credentials, giving the consent to the required resource, or completing the two factor authentication.
245+
Calling the `acquireTokenPopup` results in a popup window to sign in (or `acquireTokenRedirect` results in redirecting users to the Microsoft identity platform endpoint) where users need to interact by either confirming their credentials, giving the consent to the required resource, or completing the two factor authentication.
211246

212247
```javascript
213-
myMSALObj.acquireTokenPopup(applicationConfig.graphScopes).then(function (accessToken) {
248+
var request = {
249+
scopes: ["user.read"]
250+
};
251+
252+
myMSALObj.acquireTokenPopup(request).then(function (tokenResponse) {
214253
// Callback code here
215-
})
254+
console.log(tokenResponse.accessToken);
255+
}).catch(function (error) {
256+
console.log(error);
257+
});
216258
```
217-
218259
> [!NOTE]
219-
> This quickstart uses the `loginRedirect` and `acquireTokenRedirect` methods when the browser used is Internet Explorer due to a [known issue](https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/Known-issues-on-IE-and-Edge-Browser#issues) related to handling of popup windows by Internet Explorer browser.
260+
> This quickstart uses the `loginRedirect` and `acquireTokenRedirect` methods when the browser used is Internet Explorer due to a [known issue](https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/Known-issues-on-IE-and-Edge-Browser#issues) related to handling of popup windows by Internet Explorer browser.
220261
221262
## Next steps
222263

73.6 KB
Loading

articles/azure-functions/media/functions-create-vnet/create-proxy.png

100644100755
File mode changed.

articles/azure-functions/media/functions-create-vnet/create-vm-1.png

100644100755
File mode changed.

articles/azure-functions/media/functions-create-vnet/create-vm-2-1.png

100644100755
File mode changed.

articles/azure-functions/media/functions-create-vnet/create-vm-2.png

100644100755
File mode changed.

articles/azure-functions/media/functions-create-vnet/networking-1.png

100644100755
File mode changed.

articles/azure-functions/media/functions-create-vnet/networking-2.png

100644100755
File mode changed.

articles/azure-functions/media/functions-create-vnet/networking-3.png

100644100755
File mode changed.

0 commit comments

Comments
 (0)