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: articles/app-service/tutorial-connect-app-access-microsoft-graph-as-app-javascript.md
+2-5
Original file line number
Diff line number
Diff line change
@@ -26,9 +26,6 @@ Your web app now has the required permissions and also adds Microsoft Graph's cl
26
26
27
27
The `DefaultAzureCredential` class from [@azure/identity](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/README.md) package is used to get a token credential for your code to authorize requests to Azure Storage. Create an instance of the `DefaultAzureCredential` class, which uses the managed identity to fetch tokens and attach them to the service client. The following code example gets the authenticated token credential and uses it to create a service client object, which gets the users in the group.
28
28
29
-
To see this code as part of a sample application, see the:
30
-
*[sample on GitHub](https://github.com/Azure-Samples/ms-identity-easyauth-nodejs-storage-graphapi/tree/main/3-WebApp-graphapi-managed-identity).
31
-
32
29
> [!NOTE]
33
30
> The [@azure/identity](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/README.md) package isn't required in your web app for basic authentication/authorization or to authenticate requests with Microsoft Graph. It's possible to [securely call downstream APIs](tutorial-auth-aad.md#call-api-securely-from-server-code) with only the App Service authentication/authorization module enabled.
34
31
>
@@ -63,7 +60,7 @@ const appSettings = {
63
60
64
61
### Call Microsoft Graph on behalf of the app
65
62
66
-
The following code shows how to call [Microsoft Graph controller](https://github.com/Azure-Samples/ms-identity-easyauth-nodejs-storage-graphapi/blob/main/2-WebApp-graphapi-on-behalf/controllers/graphController.js) as the app and get some user information.
63
+
The following code shows how to call Microsoft Graph controller as the app and get some user information.
The previous code relies on the following [getAuthenticatedClient](https://github.com/Azure-Samples/ms-identity-easyauth-nodejs-storage-graphapi/blob/main/3-WebApp-graphapi-managed-identity/utils/graphHelper.js) function to return Microsoft Graph client.
94
+
The previous code relies on the following getAuthenticatedClient function to return Microsoft Graph client.
Copy file name to clipboardExpand all lines: articles/app-service/tutorial-connect-app-access-microsoft-graph-as-user-javascript.md
+3-6
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,6 @@ ms.subservice: web-apps
24
24
25
25
Your web app now has the required permissions and also adds Microsoft Graph's client ID to the login parameters.
26
26
27
-
To see this code as part of a sample application, see the:
28
-
*[Sample on GitHub](https://github.com/Azure-Samples/ms-identity-easyauth-nodejs-storage-graphapi/tree/main/2-WebApp-graphapi-on-behalf).
29
-
30
27
### Install client library packages
31
28
32
29
Install the [@azure/identity](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/README.md) and the [@microsoft/microsoft-graph-client](https://www.npmjs.com/package/@microsoft/microsoft-graph-client?activeTab=readme) packages in your project with npm.
Create an object to hold the [authentication settings](https://github.com/Azure-Samples/ms-identity-easyauth-nodejs-storage-graphapi/blob/main/2-WebApp-graphapi-on-behalf/app.js):
37
+
Create an object to hold the authentication settings:
41
38
42
39
```javascript
43
40
// partial code in app.js
@@ -63,7 +60,7 @@ const appSettings = {
63
60
64
61
### Call Microsoft Graph on behalf of the user
65
62
66
-
The following code shows how to call [Microsoft Graph controller](https://github.com/Azure-Samples/ms-identity-easyauth-nodejs-storage-graphapi/blob/main/2-WebApp-graphapi-on-behalf/controllers/graphController.js) as the app and get some user information.
63
+
The following code shows how to call Microsoft Graph controller as the app and get some user information.
The previous code relies on the following [getAuthenticatedClient](https://github.com/Azure-Samples/ms-identity-easyauth-nodejs-storage-graphapi/blob/main/2-WebApp-graphapi-on-behalf/utils/graphHelper.js) function to return Microsoft Graph client.
92
+
The previous code relies on the following getAuthenticatedClient function to return Microsoft Graph client.
Copy file name to clipboardExpand all lines: articles/app-service/tutorial-connect-app-access-storage-javascript.md
-3
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,6 @@ ms.subservice: web-apps
23
23
## Access Blob Storage
24
24
The `DefaultAzureCredential` class from [@azure/identity](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/README.md) package is used to get a token credential for your code to authorize requests to Azure Storage. The `BlobServiceClient` class from [@azure/storage-blob](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob) package is used to upload a new blob to storage. Create an instance of the `DefaultAzureCredential` class, which uses the managed identity to fetch tokens and attach them to the blob service client. The following code example gets the authenticated token credential and uses it to create a service client object, which uploads a new blob.
25
25
26
-
To see this code as part of a sample application, see *StorageHelper.js* in the:
27
-
*[Sample on GitHub](https://github.com/Azure-Samples/ms-identity-easyauth-nodejs-storage-graphapi/tree/main/1-WebApp-storage-managed-identity).
0 commit comments