Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme inconsistency #18098

Merged
merged 24 commits into from
Oct 13, 2021
Merged
Changes from 19 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ffeeec9
readme consistency
KarishmaGhiya Oct 8, 2021
702975f
readme inconsistency
KarishmaGhiya Oct 8, 2021
79af268
update
KarishmaGhiya Oct 8, 2021
476ebe7
VS code
KarishmaGhiya Oct 8, 2021
effa80e
plugin package
KarishmaGhiya Oct 8, 2021
838d034
update troubleshooting guide
KarishmaGhiya Oct 8, 2021
ddf1ecb
plugins
KarishmaGhiya Oct 11, 2021
ccd97c8
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
725ca5f
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
38e32a5
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
d1b9cbb
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
e11478a
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
60f7f28
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
03994d2
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
ed17db2
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
25e2d27
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
69a09ed
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
38e6ad6
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
2df27ce
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 11, 2021
62d826b
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 12, 2021
9b29fd8
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 13, 2021
89d7658
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 13, 2021
0dd3628
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 13, 2021
7cf4c99
Update sdk/identity/identity/README.md
KarishmaGhiya Oct 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions sdk/identity/identity/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Azure Identity client library for JavaScript

The Azure Identity library provides [Azure Active Directory (AAD)](https://docs.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) token authentication through a set of convenient [TokenCredential](https://docs.microsoft.com/javascript/api/@azure/core-auth/tokencredential) implementations. It enables Azure SDK clients to authenticate with AAD, while also allowing other JavaScript and TypeScript apps to authenticate with AAD work and school accounts, Microsoft personal accounts (MSA), and other Identity providers through the [AAD B2C](https://docs.microsoft.com/azure/active-directory-b2c/overview) service.
The Azure Identity library provides [Azure Active Directory (Azure AD)](https://docs.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) token authentication through a set of convenient [TokenCredential](https://docs.microsoft.com/javascript/api/@azure/core-auth/tokencredential) implementations.

You can find examples for these various credentials in the [Azure Identity Examples Page](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md)
You can find examples for various credentials in the [Azure Identity Examples Page](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md)
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved

Key links:

Expand Down Expand Up @@ -86,6 +86,14 @@ To authenticate with [Azure PowerShell][azure_powershell] users can run the `Con

If interactive authentication cannot be supported in the session, then the `-UseDeviceAuthentication` argument will force the cmdlet to use a device code authentication flow instead, similar to the corresponding option in the Azure CLI credential.

#### Authenticate via Visual Studio Code

Developers using Visual Studio Code can use the [Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) to authenticate via the IDE. Apps using `DefaultAzureCredential` or `VisualStudioCodeCredential` can then use this account to authenticate calls in their app when running locally.

To authenticate in Visual Studio Code, first ensure the Azure Account extension is installed. Once the extension is installed, open the **Command Palette** and run the **Azure: Sign In** command.

In addition to this, use the [`@azure/identity-vscode`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity-vscode) plugin package. This package provides the dependencies of `VisualStudioCodeCredential` and enables it. See [Plugins](##plugins).
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved

### Authenticate the client in browsers

To authenticate Azure SDKs within web browsers, we currently offer the `InteractiveBrowserCredential`, which can be set to use redirection or popups to complete the authentication flow. It is necessary to [create an Azure App Registration](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) in the portal for your web application first.
Expand Down Expand Up @@ -215,6 +223,24 @@ The [Managed identity authentication](https://docs.microsoft.com/azure/active-di

For examples of how to use managed identity for authentication please refer to [the examples](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-in-azure-with-managed-identity)

## Cloud configuration

Credentials default to authenticating to the Azure AD endpoint for Azure Public Cloud. To access resources in other clouds, such as Azure Government or a private cloud, configure credentials with the `authorityHost` argument in the constructor. The `AzureAuthorityHosts` interface defines authorities for well-known clouds. For the US Government cloud, you could instantiate a credential this way:

```ts
import { AzureAuthorityHosts, ClientSecretCredential } from "@azure/identity";
const credential = new ClientSecretCredential(
"<YOUR_TENANT_ID>",
"<YOUR_CLIENT_ID>",
"<YOUR_CLIENT_SECRET>",
{
authorityHost: AzureAuthorityHosts.AzureGovernment
}
);
```

Not all credentials require this configuration. Credentials that authenticate through a development tool, such as `AzureCliCredential`, use that tool's configuration. Similarly, `VisualStudioCodeCredential` accepts an `authorityHost` argument but defaults to the `authorityHost` matching Visual Studio Code's **Azure: Cloud** setting.

## Credential Classes

### Authenticating Azure Hosted Applications
Expand Down Expand Up @@ -265,12 +291,22 @@ import { setLogLevel } from "@azure/logger";
setLogLevel("info");
```

For assistance with troubleshooting, see the [troubleshooting guide](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/Troubleshooting.md).

## Next steps

### Read the documentation

API documentation for this library can be found on our [documentation site](https://docs.microsoft.com/javascript/api/@azure/identity).

### Client library support

Client and management libraries listed on the [Azure SDK releases page](https://azure.github.io/azure-sdk/releases/latest/js.html) that support Azure AD authentication accept credentials from this library. Learn more about using these libraries in their documentation, which is linked from the releases page.

### Azure AD B2C support
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved

This library also allows other JavaScript and TypeScript apps to authenticate with Azure AD work and school accounts, Microsoft personal accounts (MSA), and other Identity providers through the [Azure AD B2C](https://docs.microsoft.com/azure/active-directory-b2c/overview) service.
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe we actually support B2C at this time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KarishmaGhiya Important ⬆️Let’s agree on something. See the Identity chat.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like we came to agreement in the chat.

### Provide Feedback

If you encounter bugs or have suggestions, please [open an issue](https://github.com/Azure/azure-sdk-for-js/issues).
Expand Down