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
This package contains an isomorphic SDK for SqlManagementClient.
3
+
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SqlManagementClient.
4
4
5
5
### Currently supported environments
6
6
7
-
- Node.js version 6.x.x or higher
8
-
-Browser JavaScript
7
+
-[LTS versions of Node.js](https://nodejs.org/about/releases/)
8
+
-Latest versions of Safari, Chrome, Edge, and Firefox.
9
9
10
-
### How to Install
10
+
### Prerequisites
11
11
12
+
You must have an [Azure subscription](https://azure.microsoft.com/free/).
13
+
14
+
### How to install
15
+
16
+
To use this SDK in your project, you will need to install two packages.
17
+
-`@azure/arm-sql` that contains the client.
18
+
-`@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
19
+
20
+
Install both packages using the below command:
12
21
```bash
13
-
npm install @azure/arm-sql
22
+
npm install --save @azure/arm-sql @azure/identity
14
23
```
15
24
25
+
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
26
+
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
27
+
16
28
### How to use
17
29
18
-
#### nodejs - Authentication, client creation and get recoverableDatabases as an example written in TypeScript.
30
+
- If you are writing a client side browser application,
31
+
- Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions.
32
+
- Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below.
33
+
- If you are writing a server side application,
34
+
-[Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples)
35
+
- Complete the set up steps required by the credential if any.
36
+
- Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below.
19
37
20
-
##### Install @azure/ms-rest-nodeauth
38
+
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
39
+
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
21
40
22
-
- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
23
-
```bash
24
-
npm install @azure/ms-rest-nodeauth@"^3.0.0"
25
-
```
41
+
#### nodejs - Authentication, client creation, and get recoverableDatabases as an example written in JavaScript.
#### browser - Authentication, client creation and get recoverableDatabases as an example written in JavaScript.
66
+
#### browser - Authentication, client creation, and get recoverableDatabases as an example written in JavaScript.
51
67
52
-
##### Install @azure/ms-rest-browserauth
53
-
54
-
```bash
55
-
npm install @azure/ms-rest-browserauth
56
-
```
68
+
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
69
+
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
70
+
- Note down the client Id from the previous step and use it in the browser sample below.
57
71
58
72
##### Sample code
59
73
60
-
See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
0 commit comments