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
**If you are not familiar with our REST client, please spend 5 minutes to take a look at our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library, the REST client provides a light-weighted & developer friendly way to call azure rest api
-[LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
17
-
- Latest versions of Safari, Chrome, Edge and Firefox.
18
-
19
-
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
16
+
- LTS versions of Node.js
20
17
21
18
### Prerequisites
22
19
23
-
-An [Azure subscription][azure_sub].
20
+
-You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package.
24
21
25
22
### Install the `@azure/arm-appcomplianceautomation` package
26
23
27
-
Install the Azure AppComplianceAutomationToolForMicrosoft365 client library for JavaScript with `npm`:
24
+
Install the Azure AppComplianceAutomation REST client REST client library for JavaScript with `npm`:
28
25
29
26
```bash
30
27
npm install @azure/arm-appcomplianceautomation
31
28
```
32
29
33
-
### Create and authenticate a `AppComplianceAutomationToolForMicrosoft365`
30
+
### Create and authenticate a `AppComplianceAutomationClient`
34
31
35
-
To create a client object to access the Azure AppComplianceAutomationToolForMicrosoft365 API, you will need the `endpoint` of your Azure AppComplianceAutomationToolForMicrosoft365 resource and a `credential`. The Azure AppComplianceAutomationToolForMicrosoft365 client can use Azure Active Directory credentials to authenticate.
36
-
You can find the endpoint for your Azure AppComplianceAutomationToolForMicrosoft365 resource in the [Azure Portal][azure_portal].
32
+
To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token),
33
+
provide an instance of the desired credential type obtained from the
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
39
-
40
-
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
41
-
42
-
```bash
43
-
npm install @azure/identity
44
-
```
45
-
46
-
You will also need to **register a new AAD application and grant access to Azure AppComplianceAutomationToolForMicrosoft365** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
47
-
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
48
-
49
-
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
// For client-side applications running in the browser, use this code instead:
59
-
// const credential = new InteractiveBrowserCredential({
60
-
// tenantId: "<YOUR_TENANT_ID>",
61
-
// clientId: "<YOUR_CLIENT_ID>"
62
-
// });
63
-
// const client = new AppComplianceAutomationToolForMicrosoft365(credential);
64
-
```
36
+
To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)
65
37
38
+
After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use.
39
+
As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
40
+
can be used to authenticate the client.
66
41
67
-
### JavaScript Bundle
68
-
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
69
-
70
-
## Key concepts
71
-
72
-
### AppComplianceAutomationToolForMicrosoft365
73
-
74
-
`AppComplianceAutomationToolForMicrosoft365` is the primary interface for developers using the Azure AppComplianceAutomationToolForMicrosoft365 client library. Explore the methods on this client object to understand the different features of the Azure AppComplianceAutomationToolForMicrosoft365 service that you can access.
42
+
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
@@ -81,28 +50,8 @@ Enabling logging may help uncover useful information about failures. In order to
81
50
82
51
```javascript
83
52
const { setLogLevel } =require("@azure/logger");
53
+
84
54
setLogLevel("info");
85
55
```
86
56
87
57
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
88
-
89
-
## Next steps
90
-
91
-
Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
92
-
93
-
## Contributing
94
-
95
-
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
96
-
97
-
## Related projects
98
-
99
-
-[Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
0 commit comments