@azure/arm-appcomplianceautomation 1.0.1-alpha.20250108.1 → 1.0.1-alpha.20250110.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -16
- package/package.json +14 -17
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ App Compliance Automation Tool for Microsoft 365 API spec
|
|
|
6
6
|
|
|
7
7
|
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcomplianceautomation/arm-appcomplianceautomation) |
|
|
8
8
|
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-appcomplianceautomation) |
|
|
9
|
-
[API reference documentation](https://
|
|
9
|
+
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-appcomplianceautomation) |
|
|
10
10
|
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
|
11
11
|
|
|
12
12
|
## Getting started
|
|
@@ -46,25 +46,37 @@ npm install @azure/identity
|
|
|
46
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
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
48
|
|
|
49
|
-
For more information about how to create an Azure AD Application check out [this guide](https://
|
|
49
|
+
For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
const { AppComplianceAutomationToolForMicrosoft365 } = require("@azure/arm-appcomplianceautomation");
|
|
53
|
-
const { DefaultAzureCredential } = require("@azure/identity");
|
|
54
|
-
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
|
51
|
+
Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.
|
|
55
52
|
|
|
56
|
-
|
|
53
|
+
```ts snippet:ReadmeSampleCreateClient_Node
|
|
54
|
+
import { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation";
|
|
55
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// const client = new AppComplianceAutomationToolForMicrosoft365(credential);
|
|
57
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
58
|
+
const client = new AppComplianceAutomationToolForMicrosoft365(
|
|
59
|
+
new DefaultAzureCredential(),
|
|
60
|
+
subscriptionId,
|
|
61
|
+
);
|
|
64
62
|
```
|
|
65
63
|
|
|
64
|
+
For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
|
|
65
|
+
|
|
66
|
+
```ts snippet:ReadmeSampleCreateClient_Browser
|
|
67
|
+
import { InteractiveBrowserCredential } from "@azure/identity";
|
|
68
|
+
import { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation";
|
|
69
|
+
|
|
70
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
71
|
+
const credential = new InteractiveBrowserCredential({
|
|
72
|
+
tenantId: "<YOUR_TENANT_ID>",
|
|
73
|
+
clientId: "<YOUR_CLIENT_ID>",
|
|
74
|
+
});
|
|
75
|
+
const client = new AppComplianceAutomationToolForMicrosoft365(credential, subscriptionId);
|
|
76
|
+
```
|
|
66
77
|
|
|
67
78
|
### JavaScript Bundle
|
|
79
|
+
|
|
68
80
|
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
81
|
|
|
70
82
|
## Key concepts
|
|
@@ -79,8 +91,9 @@ To use this client library in the browser, first you need to use a bundler. For
|
|
|
79
91
|
|
|
80
92
|
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
|
81
93
|
|
|
82
|
-
```
|
|
83
|
-
|
|
94
|
+
```ts snippet:SetLogLevel
|
|
95
|
+
import { setLogLevel } from "@azure/logger";
|
|
96
|
+
|
|
84
97
|
setLogLevel("info");
|
|
85
98
|
```
|
|
86
99
|
|
|
@@ -100,7 +113,7 @@ If you'd like to contribute to this library, please read the [contributing guide
|
|
|
100
113
|
|
|
101
114
|

|
|
102
115
|
|
|
103
|
-
[azure_cli]: https://
|
|
116
|
+
[azure_cli]: https://learn.microsoft.com/cli/azure
|
|
104
117
|
[azure_sub]: https://azure.microsoft.com/free/
|
|
105
118
|
[azure_sub]: https://azure.microsoft.com/free/
|
|
106
119
|
[azure_portal]: https://portal.azure.com
|
package/package.json
CHANGED
|
@@ -3,25 +3,26 @@
|
|
|
3
3
|
"sdk-type": "mgmt",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "A generated SDK for AppComplianceAutomationToolForMicrosoft365.",
|
|
6
|
-
"version": "1.0.1-alpha.
|
|
6
|
+
"version": "1.0.1-alpha.20250110.1",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=18.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@azure/abort-controller": "^1.
|
|
12
|
-
"@azure/core-auth": "^1.
|
|
13
|
-
"@azure/core-client": "^1.
|
|
14
|
-
"@azure/core-lro": "^2.
|
|
15
|
-
"@azure/core-paging": "^1.2
|
|
16
|
-
"@azure/core-rest-pipeline": "^1.
|
|
17
|
-
"tslib": "^2.
|
|
11
|
+
"@azure/abort-controller": "^2.1.2",
|
|
12
|
+
"@azure/core-auth": "^1.9.0",
|
|
13
|
+
"@azure/core-client": "^1.9.2",
|
|
14
|
+
"@azure/core-lro": "^2.7.2",
|
|
15
|
+
"@azure/core-paging": "^1.6.2",
|
|
16
|
+
"@azure/core-rest-pipeline": "^1.18.1",
|
|
17
|
+
"tslib": "^2.8.1"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
20
20
|
"node",
|
|
21
21
|
"azure",
|
|
22
22
|
"typescript",
|
|
23
23
|
"browser",
|
|
24
|
-
"isomorphic"
|
|
24
|
+
"isomorphic",
|
|
25
|
+
"cloud"
|
|
25
26
|
],
|
|
26
27
|
"license": "MIT",
|
|
27
28
|
"main": "./dist/commonjs/index.js",
|
|
@@ -32,20 +33,16 @@
|
|
|
32
33
|
"@azure-tools/test-recorder": ">=4.1.0-alpha <4.1.0-alphb",
|
|
33
34
|
"@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
|
|
34
35
|
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
35
|
-
"@azure/identity": "^4.0
|
|
36
|
+
"@azure/identity": "^4.5.0",
|
|
36
37
|
"@types/node": "^18.0.0",
|
|
37
38
|
"@vitest/browser": "^2.1.8",
|
|
38
39
|
"@vitest/coverage-istanbul": "^2.1.8",
|
|
39
40
|
"dotenv": "^16.0.0",
|
|
40
41
|
"playwright": "^1.49.1",
|
|
41
|
-
"tsx": "^4.7.1",
|
|
42
42
|
"typescript": "~5.7.2",
|
|
43
43
|
"vitest": "^2.1.8"
|
|
44
44
|
},
|
|
45
|
-
"repository":
|
|
46
|
-
"type": "git",
|
|
47
|
-
"url": "https://github.com/Azure/azure-sdk-for-js.git"
|
|
48
|
-
},
|
|
45
|
+
"repository": "github:Azure/azure-sdk-for-js",
|
|
49
46
|
"bugs": {
|
|
50
47
|
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
|
51
48
|
},
|
|
@@ -80,7 +77,7 @@
|
|
|
80
77
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
81
78
|
"unit-test:browser": "echo skipped",
|
|
82
79
|
"unit-test:node": "dev-tool run test:vitest",
|
|
83
|
-
"update-snippets": "
|
|
80
|
+
"update-snippets": "dev-tool run update-snippets"
|
|
84
81
|
},
|
|
85
82
|
"sideEffects": false,
|
|
86
83
|
"//metadata": {
|
|
@@ -99,7 +96,7 @@
|
|
|
99
96
|
"azure"
|
|
100
97
|
],
|
|
101
98
|
"disableDocsMs": true,
|
|
102
|
-
"apiRefLink": "https://
|
|
99
|
+
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-appcomplianceautomation?view=azure-node-preview"
|
|
103
100
|
},
|
|
104
101
|
"type": "module",
|
|
105
102
|
"tshy": {
|