Home
%3CLINGO-SUB%20id%3D%22lingo-sub-1380589%22%20slang%3D%22en-US%22%3EMay%202020%20Azure%20SDK%20Release%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1380589%22%20slang%3D%22en-US%22%3E%3CP%3EWelcome%20to%20the%20May%20release%20of%20the%20Azure%20SDK.%20We%20have%20updated%20the%20following%20libraries%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EEvent%20Hubs%3C%2FLI%3E%0A%3CLI%3EStorage%20(Python%20only)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThese%20are%20ready%20to%20use%20in%20your%20production%20applications.%20You%20can%20find%20details%20of%20all%20released%20libraries%20on%20%3CA%20href%3D%22https%3A%2F%2Fazure.github.io%2Fazure-sdk%2Freleases%2Flatest%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eour%20releases%20page%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENew%20preview%20releases%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EForm%20Recognizer%3C%2FLI%3E%0A%3CLI%3ESearch%3C%2FLI%3E%0A%3CLI%3EService%20Bus%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIn%20addition%2C%20there%20is%20a%20new%20preview%20release%20for%20Azure%20Identity%2C%20which%20features%20improvements%20to%20the%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20to%20better%20support%20common%20developer%20workflows.%20See%20below%20for%20more%20details.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20believe%20these%20are%20ready%20for%20you%20to%20use%20and%20experiment%20with%2C%20but%20not%20yet%20ready%20for%20production.%20Between%20now%20and%20the%20GA%20release%2C%20these%20libraries%20may%20undergo%20API%20changes.%26nbsp%3B%20We'd%20love%20your%20feedback!%20If%20you%20use%20these%20libraries%20and%20live%20what%20you%20see%2C%20or%20you%20want%20to%20see%20changes%2C%20let%20us%20know%20in%20GitHub%20issues.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1351752607%22%20id%3D%22toc-hId--1351752607%22%3EGetting%20Started%3C%2FH2%3E%0A%3CP%3EUse%20the%20links%20below%20to%20get%20started%20with%20your%20language%20of%20choice.%20You%20will%20notice%20that%20all%20the%20preview%20libraries%20are%20tagged%20with%20%22preview%22.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fazure.github.io%2Fazure-sdk%2Freleases%2F2020-05%2Fdotnet.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E.NET%20release%20notes%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fazure.github.io%2Fazure-sdk%2Freleases%2F2020-05%2Fjava.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EJava%20release%20notes%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fazure.github.io%2Fazure-sdk%2Freleases%2F2020-05%2Fpython.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPython%20release%20notes%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fazure.github.io%2Fazure-sdk%2Freleases%2F2020-05%2Fjs.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EJavaScript%20%2F%20TypeScript%20release%20notes%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIf%20you%20want%20to%20dive%20deep%20into%20the%20content%2C%20the%20release%20notes%20linked%20above%20and%20the%20change%20logs%20they%20point%20to%20give%20more%20details%20on%20what%20has%20changed.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1135760226%22%20id%3D%22toc-hId-1135760226%22%3EIn%20depth%3A%20Azure%20Identity%3C%2FH2%3E%0A%3CP%3EIn%20the%20Azure%20SDK%2C%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20is%20the%20recommended%20way%20to%20handle%20authentication%20across%20your%20local%20workstation%20and%20your%20deployment%20environment.%20It%20attempts%20to%20figure%20out%20what%20environment%20you%20are%20running%20in%2C%20and%20uses%20the%20most%20appropriate%20credential%20for%20the%20purpose.%20Its%20use%20and%20features%20are%20explained%20in%20our%20%3CA%20href%3D%22https%3A%2F%2Fazure.github.io%2Fazure-sdk%2Fposts%2F2020-02-25%2Fdefaultazurecredentials.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eprevious%20blog%20post%3C%2FA%3E.%20The%20latest%20release%20of%20the%20Azure%20Identity%20library%20contains%20numerous%20improvements%20to%20improve%20the%20developer%20experience%20around%20authentication%2C%20including%20integration%20with%20more%20tools%20and%20better%20diagnostics.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--671694237%22%20id%3D%22toc-hId--671694237%22%3ENew%20credential%20types%3C%2FH2%3E%0A%3CP%3E%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20looks%20through%20four%20specific%20locations%20to%20find%20suitable%20information%20for%20authenticating%20to%20the%20service%3A%20environment%20variables%2C%20managed%20identity%2C%20the%20MSAL%20shared%20token%20cache%20(supporting%20tools%20like%20Visual%20Studio)%20and%20the%20Azure%20CLI.%20In%20.NET%20and%20Python%2C%20you%20can%20also%20enable%20an%20interactive%20browser%2C%20which%20asks%20you%20to%20log%20into%20Azure.%20In%20this%20release%2C%20we%20are%20adding%20more%20credentials%20that%20can%20work%20seamlessly%20in%20your%20favorite%20IDEs.%20Most%20of%20these%20credentials%20are%20stored%20in%20encrypted%20locations%2C%20eliminating%20the%20need%20to%20set%20up%20credentials%20in%20a%20file%20or%20environment%20variables%2C%20thus%20lowering%20your%20risk%20of%20exposing%20your%20personal%20identification%20information%20on%20your%20workstation.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20release%2C%20we%20will%20support%20authentication%20via%20standard%20tooling%3A%20Visual%20Studio%20(for%20.NET)%2C%20Visual%20Studio%20Code%2C%20IntelliJ%20(for%20Java)%2C%20and%20the%20Azure%20CLI.%20They%20are%20slotted%20onto%20the%20end%20of%20the%20default%20credential%20chain%20provided%20in%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E.%20The%20new%20list%20of%20credentials%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20supports%20and%20attempts%20to%20authenticate%20with%20are%20listed%20below%2C%20in%20order%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CTT%3EEnvironmentCredential%3C%2FTT%3E%3C%2FLI%3E%0A%3CLI%3E%3CTT%3EManagedIdentityCredential%3C%2FTT%3E%3C%2FLI%3E%0A%3CLI%3E%3CTT%3ESharedTokenCacheCredential%3C%2FTT%3E%20(Windows%20only%2C%20with%20MacOS%20%26amp%3B%20Linux%20supporting%20coming%20soon)%3C%2FLI%3E%0A%3CLI%3E%3CTT%3EVisualStudioCredential%3C%2FTT%3E%20(.NET%20only)%3C%2FLI%3E%0A%3CLI%3E%3CTT%3EIntelliJCredential%3C%2FTT%3E%20(Java%20only)%3C%2FLI%3E%0A%3CLI%3E%3CTT%3EVisualStudioCodeCredential%3C%2FTT%3E%3C%2FLI%3E%0A%3CLI%3E%3CTT%3EAzureCliCredential%3C%2FTT%3E%3C%2FLI%3E%0A%3CLI%3E%3CTT%3EInteractiveBrowserCredential%3C%2FTT%3E%20(.NET%20%26amp%3B%20Python%20only%2C%20disabled%20by%20default)%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EI'll%20now%20walk%20you%20through%20the%20steps%20to%20configure%20and%20set%20up%20these%20credentials.%3C%2FP%3E%0A%3CH3%20id%3D%22visualstudiocodecredential%22%20id%3D%22toc-hId-18867237%22%20id%3D%22toc-hId-18867237%22%3EVisualStudioCodeCredential%3C%2FH3%3E%0A%3CP%3EThe%20Visual%20Studio%20Code%20authentication%20is%20handled%20by%20an%20integration%20with%20the%20Azure%20Account%20extension.%20To%20use%2C%20install%20the%20Azure%20Account%20extension%2C%20then%20use%20View-%26gt%3BCommand%20Palette%20to%20execute%20the%20%22Azure%3A%20Sign%20In%22%20command%3A%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2205122020-vscode-sign-in.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F190647i78F35760AD16F25A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%2205122020-vscode-sign-in.png%22%20alt%3D%2205122020-vscode-sign-in.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThis%20will%20open%20a%20browser%20that%20allows%20you%20to%20sign%20in%20to%20Azure.%20Once%20you%20have%20completed%20the%20login%20process%2C%20you%20can%20close%20the%20browser%20as%20directed.%20Running%20your%20application%20(either%20in%20the%20debugger%20or%20anywhere%20on%20the%20development%20machine)%20will%20use%20the%20credential%20from%20your%20sign-in.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2205122020-vscode-logged-in.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F190648iCE2D7ABDC3F44C83%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%2205122020-vscode-logged-in.png%22%20alt%3D%2205122020-vscode-logged-in.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EOnce%20you%20are%20logged%20in%2C%20in%20your%20application%2C%20your%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20will%20be%20able%20to%20pick%20up%20the%20user%20account%20logged%20in%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3E%2F%2F%20.NET%0Avar%20client%20%3D%20new%20SecretClient(new%20Uri(keyVaultUrl)%2C%20new%20DefaultAzureCredential(true))%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3E%2F%2F%20Java%0ADefaultAzureCredential%20credential%20%3D%20new%20DefaultAzureCredentialBuilder().build()%3B%0A%0ASecretClient%20secretClient%20%3D%20new%20SecretClientBuilder()%0A%20%20%20%20.vaultUrl(%22https%3A%2F%2Fmysecretkeyvault.vault.azure.net%22)%0A%20%20%20%20.credential(credential)%0A%20%20%20%20.buildClient()%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3E%2F%2F%20JavaScript%0Aconst%20client%20%3D%20new%20SecretClient(keyVaultUrl%2C%20new%20DefaultAzureCredential())%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%3E%23%20Python%0Aclient%20%3D%20SecretClient(vault_url%2C%20DefaultAzureCredential())%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22visualstudiocredential%22%20id%3D%22toc-hId--1788587226%22%20id%3D%22toc-hId--1788587226%22%3EVisualStudioCredential%3C%2FH3%3E%0A%3CP%3EFor%20.NET%20developers%20using%20Visual%20Studio%202017%20or%20above%2C%20we%20are%20adding%20another%20credential%20%3CTT%3EVisualStudioCredential%3C%2FTT%3E.%20Applications%20using%20this%20credential%20will%20be%20able%20to%20use%20the%20same%20account%20logged%20in%20to%20Azure%20from%20Visual%20Studio.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20your%20Visual%20Studio%20window%2C%20On%20the%20right%20top%20corner%20there%20should%20show%20your%20name%20or%20a%20%22Sign%20in%22%20link.%20Sign%20in%20or%20click%20on%20your%20name%20-%26gt%3B%20Account%20settings.%20Make%20sure%20your%20account%20is%20listed%20in%20the%20%22All%20Accounts%22%20section.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2205122020-vs-accounts.png%22%20style%3D%22width%3A%20978px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F190653i852032F037020873%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%2205122020-vs-accounts.png%22%20alt%3D%2205122020-vs-accounts.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EOnce%20you%20are%20logged%20in%2C%20in%20your%20application%2C%20your%20%3CTT%3EVisualStudioCredential%3C%2FTT%3E%20will%20be%20able%20to%20pick%20up%20the%20user%20account%20logged%20in%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3E%2F%2F%20.NET%0Avar%20client%20%3D%20new%20SecretClient(new%20Uri(keyVaultUrl)%2C%20new%20DefaultAzureCredential(true))%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22intellijcredential%22%20id%3D%22toc-hId-698925607%22%20id%3D%22toc-hId-698925607%22%3EIntelliJCredential%3C%2FH3%3E%0A%3CP%3EFor%20Java%20developers%20using%20IntelliJ%20IDEA%2C%20we%20are%20adding%20another%20credential%20%3CTT%3EIntelliJCredential%3C%2FTT%3E.%20Applications%20using%20this%20credential%20will%20be%20able%20to%20use%20the%20same%20account%20logged%20in%20Azure%20Toolkit%20for%20IntelliJ.%20You%20will%20need%20IntelliJ%20IDEA%202019.1%20or%20above%20and%20the%20latest%20Azure%20Toolkit%20for%20IntelliJ%20plugin.%3C%2FP%3E%0A%3CP%3EIn%20your%20IntelliJ%20window%2C%20open%20File%20-%26gt%3B%20Settings%20-%26gt%3B%20Plugins.%20Search%20%22Azure%20Toolkit%20for%20IntelliJ%22%20in%20the%20marketplace.%20Install%20and%20restart%20IDE.%3C%2FP%3E%0A%3CP%3ENow%20you%20should%20be%20able%20to%20find%20a%20new%20menu%20item%20Tools%20-%26gt%3B%20Azure%20-%26gt%3B%20Azure%20Sign%20In...%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2205122020-intellij-sign-in.png%22%20style%3D%22width%3A%20867px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F190654i33E9D6B2EF4BB416%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%2205122020-intellij-sign-in.png%22%20alt%3D%2205122020-intellij-sign-in.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EDevice%20Login%20will%20help%20you%20login%20as%20a%20user%20account.%20Follow%20the%20instructions%20to%20login%20on%20the%20%3CA%20href%3D%22http%3A%2F%2Flogin.microsoftonline.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elogin.microsoftonline.com%3C%2FA%3E%20website%20with%20the%20device%20code.%20IntelliJ%20will%20prompt%20you%20to%20select%20your%20subscriptions.%20You%20are%20free%20to%20choose%20any%20you%20want%20-%20it%20doesn't%20matter%20for%20our%20use%20case.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20you%20are%20logged%20in%2C%20in%20your%20application%2C%20your%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20will%20be%20able%20to%20pick%20up%20the%20user%20account%20automatically%20on%20Mac%20or%20Linux%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3EDefaultAzureCredential%20credential%20%3D%20new%20DefaultAzureCredentialBuilder().build()%3B%0A%0ASecretClient%20secretClient%20%3D%20new%20SecretClientBuilder()%0A%20%20%20%20.vaultUrl(%22https%3A%2F%2Fmysecretkeyvault.vault.azure.net%22)%0A%20%20%20%20.credential(credential)%0A%20%20%20%20.buildClient()%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOn%20Windows%2C%20sepcify%20the%20KeePass%20database%20path%20to%20read%20IntelliJ%20credentials.%20You%20can%20find%20the%20path%20in%20IntelliJ%20settings%20under%20File%20-%26gt%3B%20Settings%20-%26gt%3B%20Appearance%20%26amp%3B%20Behavior%20-%26gt%3B%20System%20Settings%20-%26gt%3B%20Passwords%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2205122020-intellij-keepass.png%22%20style%3D%22width%3A%20996px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F190656iEEE23A7B5095020D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%2205122020-intellij-keepass.png%22%20alt%3D%2205122020-intellij-keepass.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAnd%20pass%20the%20database%20path%20into%20the%20%3CTT%3EDefaultAzureCredentialBuilder%3C%2FTT%3E%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3EDefaultAzureCredential%20credential%20%3D%20new%20DefaultAzureCredentialBuilder()%0A%20%20%20%20.intelliJKeePassDatabasePath(%22C%3A%5C%5CUsers%5C%5Cjianghaolu%5C%5CAppData%5C%5CRoaming%5C%5CJetBrains%5C%5CIdeaIC2020.1%5C%5Cc.kdbx%22)%0A%20%20%20%20.build()%3B%0A%0ASecretClient%20secretClient%20%3D%20new%20SecretClientBuilder()%0A%20%20%20%20.vaultUrl(%22https%3A%2F%2Fmysecretkeyvault.vault.azure.net%22)%0A%20%20%20%20.credential(credential)%0A%20%20%20%20.buildClient()%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-688422503%22%20id%3D%22toc-hId-688422503%22%3EAdjust%20which%20credentials%20are%20used%20in%20DefaultAzureCredential%3C%2FH2%3E%0A%3CP%3EWith%20the%20increasing%20number%20of%20credentials%20in%20the%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20chain%20and%20the%20automatic%20fallback%20to%20the%20next%20credential%20design%2C%20it's%20difficult%20to%20control%20and%20monitor%20which%20credential%20is%20actually%20being%20used.%20We%20are%20introducing%20a%20set%20of%20new%20ways%20to%20fine%20control%20which%20exceptions%20to%20exclude%2C%20when%20to%20fail%20and%20when%20to%20fallback%20to%20the%20next%20credential%20in%20chain%2C%20and%20how%20to%20monitor%20which%20credential%20is%20being%20used.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1378983977%22%20id%3D%22toc-hId-1378983977%22%3EExclude%20certain%20credentials%3C%2FH3%3E%0A%3CP%3ESometimes%2C%20the%20environment%20we%20are%20running%20our%20applications%20in%20uses%20a%20credential%20sitting%20in%20the%20back%20of%20the%20chain.%20When%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20searches%20for%20a%20credential%20to%20authenticate%20with%2C%20it%20will%20attempt%20a%20few%20other%20credentials%20to%20reach%20the%20one%20desired.%20This%20is%20not%20only%20slow%2C%20but%20could%20also%20pick%20up%20the%20wrong%20credential%2C%20or%20peeking%20into%20secure%20system%20data%20we'd%20like%20to%20avoid.%20In%20this%20release%2C%20you%20can%20now%20customize%20the%20chain%20by%20excluding%20any%20number%20of%20them%20when%20creating%20an%20instance%20of%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E.%20For%20example%2C%20in%20my%20development%20environment%20I%20use%20%3CTT%3EVisualStudioCodeCredential%3C%2FTT%3E%20and%20my%20application%20is%20deployed%20to%20a%20virtual%20machine%20in%20Azure%20where%20Managed%20Identity%20is%20available%2C%20I%20can%20create%20a%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20as%20follows%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3E%2F%2F%20.NET%0Avar%20options%20%3D%20new%20DefaultAzureCredentialOptions%0A%7B%0A%20%20%20%20ExcludeEnvironmentCredential%20%3D%20true%2C%0A%20%20%20%20ExcludeManagedIdentityCredential%20%3D%20false%2C%0A%20%20%20%20ExcludeSharedTokenCacheCredential%20%3D%20true%2C%0A%20%20%20%20ExcludeVisualStudioCredential%20%3D%20true%2C%0A%20%20%20%20ExcludeVisualStudioCodeCredential%20%3D%20false%2C%0A%20%20%20%20ExcludeAzureCliCredential%20%3D%20true%2C%0A%20%20%20%20ExcludeInteractiveBrowserCredential%20%3D%20true%0A%7D%3B%0A%0Avar%20client%20%3D%20new%20SecretClient(new%20Uri(keyVaultUrl)%2C%20new%20DefaultAzureCredential(options))%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3E%2F%2F%20Java%0ADefaultAzureCredential%20credential%20%3D%20new%20DefaultAzureCredentialBuilder()%0A%20%20%20%20.excludeEnvironmentCredential()%0A%20%20%20%20.excludeSharedTokenCacheCredential()%0A%20%20%20%20.excludeVsCodeCredential()%0A%20%20%20%20.excludeIntelliJCredential()%0A%20%20%20%20.build()%3B%0A%0ASecretClient%20secretClient%20%3D%20new%20SecretClientBuilder()%0A%20%20%20%20.vaultUrl(%22https%3A%2F%2Fmysecretkeyvault.vault.azure.net%22)%0A%20%20%20%20.credential(credential)%0A%20%20%20%20.buildClient()%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%3E%23%20Python%0Acredential%20%3D%20DefaultAzureCredential(%0A%20%20%20%20exclude_environment_credential%3DTrue%2C%0A%20%20%20%20exclude_shared_token_cache_credential%3DTrue%2C%0A%20%20%20%20exclude_cli_credential%3DTrue%0A)%0Aclient%20%3D%20SecretClient(vault_url%2C%20credential)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20%3CTT%3ESecretClient%3C%2FTT%3E%20created%20with%20the%20above%20code%20will%20only%20attempt%20authentication%20with%20%3CTT%3EManagedIdentityCredential%3C%2FTT%3E%20and%20%3CTT%3EVisualStudioCodeCredential%3C%2FTT%3E.%20This%20feature%20is%20not%20available%20in%20JavaScript%20yet%20-%20similar%20configurations%20on%20what%20underlying%20credentials%20will%20be%20used%20to%20authenticate%20in%20a%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%26nbsp%3Bare%20coming%20soon%20for%20JavaScript.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--428470486%22%20id%3D%22toc-hId--428470486%22%3EFail%20the%20authentication%2C%20don't%20try%20the%20next%3C%2FH3%3E%0A%3CP%3EWhen%20a%20credential%20fails%20to%20authenticate%2C%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20automatically%20tries%20the%20next%20credential.%20This%20can%20cause%20problems%20when%20you%20partially%20configure%20a%20credential.%20For%20example%2C%20in%20the%20past%2C%20if%20the%20secret%20in%20the%20environment%20variable%20%3CTT%3EAZURE_CLIENT_SECRET%3C%2FTT%3E%20expired%2C%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20will%20try%20the%20other%20options.%20If%20you%20have%20accounts%20signed%20in%20VS%20Code%20or%20Azure%20CLI%2C%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20may%20be%20using%20those%20accounts%20without%20you%20realizing%20it.%3C%2FP%3E%0A%3CP%3EIn%20the%20latest%20release%2C%20if%20the%20configuration%20is%20present%20for%20a%20credential%2C%20but%20authentication%20fails%2C%20the%20entire%20chain%20fails%2C%20resulting%20in%20a%20faster%20%22fail%22.%20We%20achieve%20this%20by%20adding%20an%20exception%20type%20%3CTT%3ECredentialUnavailableException%3C%2FTT%3E.%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20will%20only%20attempt%20to%20authenticate%20with%20the%20next%20credential%20if%20a%20%3CTT%3ECredentialUnavailableException%3C%2FTT%3E%20is%20thrown%20from%20the%20current%20credential.%20In%20the%20above%20example%2C%20if%20the%20environment%20variables%20are%20present%20but%20authentication%20failed%2C%20the%20%3CTT%3EEnvironmentCredential%3C%2FTT%3E%20will%20not%20throw%20%3CTT%3ECredentialUnavailableException%3C%2FTT%3E%2C%20causing%20%3CTT%3EDefaultAzureCredential%3C%2FTT%3E%20to%20propagate%20the%20exception%20and%20stop%20trying%20other%20credentials.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--438973590%22%20id%3D%22toc-hId--438973590%22%3ECommunity%20acknowledgements%3C%2FH2%3E%0A%3CP%3EI'd%20like%20to%20give%20special%20thanks%20to%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Falexbaeza%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAlejandro%20Baeza%3C%2FA%3E%26nbsp%3Band%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FHankiGreed%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EKiran%20Hegde%3C%2FA%3E%26nbsp%3Bfor%20helping%20us%20improve%20the%20Azure%20Identity%20libraries%20on%20GitHub.%20Your%20contributions%20have%20helped%20many%20people%20and%20organizations%20succeed!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--572658314%22%20id%3D%22toc-hId--572658314%22%3EWorking%20with%20us%20and%20giving%20feedback%3C%2FH2%3E%0A%3CP%3ESo%20far%2C%20the%20community%20has%20filed%20hundreds%20of%20issues%20against%20these%20new%20SDKs%20with%20feedback%20ranging%20from%20documentation%20issues%20to%20API%20surface%20area%20change%20requests%20to%20pointing%20out%20failure%20cases.%20Please%20keep%20that%20coming.%20We%20work%20in%20the%20open%20on%20GitHub%20and%20you%20can%20submit%20issues%20here%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20title%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk%2F%22%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk%2F%22%3EAPI%20design%20guidelines%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20title%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-net%22%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-net%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-net%22%3E.NET%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20title%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-java%22%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-java%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-java%22%3EJava%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20title%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-js%22%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-js%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-js%22%3EJavaScript%20%2F%20TypeScript%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20title%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-python%22%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-python%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-python%22%3EPython%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EFinally%2C%20please%20keep%20up%20to%20date%20with%20all%20the%20news%20about%20the%20Azure%20developer%20experience%20programs%20and%20let%20us%20know%20how%20we%20are%20doing%20by%20following%20%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2FAzureSDK%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%40AzureSDK%3C%2FA%3E%20on%20Twitter.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1380589%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20this%20release%2C%20we%20have%20updated%20Event%20hubs%20and%20Storage%2C%20with%20new%20preview%20releases%20of%20Form%20Recognizer%2C%20Search%2C%20and%20Service%20Bus.%26nbsp%3B%20We%20also%20deep-dive%20on%20the%20work%20being%20done%20to%20make%20authenticating%20to%20services%20easier%20through%20improvements%20to%20the%20DefaultAzureCredential.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1380589%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eazure-identity%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eazure-sdk%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECSharp%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Edotnet%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ejava%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EJavaScript%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Epython%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Etypescript%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Welcome to the May release of the Azure SDK. We have updated the following libraries:

  • Event Hubs
  • Storage (Python only)

These are ready to use in your production applications. You can find details of all released libraries on our releases page.

 

New preview releases:

  • Form Recognizer
  • Search
  • Service Bus

In addition, there is a new preview release for Azure Identity, which features improvements to the DefaultAzureCredential to better support common developer workflows. See below for more details.

 

We believe these are ready for you to use and experiment with, but not yet ready for production. Between now and the GA release, these libraries may undergo API changes.  We'd love your feedback! If you use these libraries and live what you see, or you want to see changes, let us know in GitHub issues.

 

Getting Started

Use the links below to get started with your language of choice. You will notice that all the preview libraries are tagged with "preview".

If you want to dive deep into the content, the release notes linked above and the change logs they point to give more details on what has changed.

 

In depth: Azure Identity

In the Azure SDK, DefaultAzureCredential is the recommended way to handle authentication across your local workstation and your deployment environment. It attempts to figure out what environment you are running in, and uses the most appropriate credential for the purpose. Its use and features are explained in our previous blog post. The latest release of the Azure Identity library contains numerous improvements to improve the developer experience around authentication, including integration with more tools and better diagnostics.

 

New credential types

DefaultAzureCredential looks through four specific locations to find suitable information for authenticating to the service: environment variables, managed identity, the MSAL shared token cache (supporting tools like Visual Studio) and the Azure CLI. In .NET and Python, you can also enable an interactive browser, which asks you to log into Azure. In this release, we are adding more credentials that can work seamlessly in your favorite IDEs. Most of these credentials are stored in encrypted locations, eliminating the need to set up credentials in a file or environment variables, thus lowering your risk of exposing your personal identification information on your workstation.

 

In this release, we will support authentication via standard tooling: Visual Studio (for .NET), Visual Studio Code, IntelliJ (for Java), and the Azure CLI. They are slotted onto the end of the default credential chain provided in DefaultAzureCredential. The new list of credentials DefaultAzureCredential supports and attempts to authenticate with are listed below, in order:

  1. EnvironmentCredential
  2. ManagedIdentityCredential
  3. SharedTokenCacheCredential (Windows only, with MacOS & Linux supporting coming soon)
  4. VisualStudioCredential (.NET only)
  5. IntelliJCredential (Java only)
  6. VisualStudioCodeCredential
  7. AzureCliCredential
  8. InteractiveBrowserCredential (.NET & Python only, disabled by default)

I'll now walk you through the steps to configure and set up these credentials.

VisualStudioCodeCredential

The Visual Studio Code authentication is handled by an integration with the Azure Account extension. To use, install the Azure Account extension, then use View->Command Palette to execute the "Azure: Sign In" command:

05122020-vscode-sign-in.png

This will open a browser that allows you to sign in to Azure. Once you have completed the login process, you can close the browser as directed. Running your application (either in the debugger or anywhere on the development machine) will use the credential from your sign-in.

05122020-vscode-logged-in.png

Once you are logged in, in your application, your DefaultAzureCredential will be able to pick up the user account logged in:

 

 

 

 

// .NET
var client = new SecretClient(new Uri(keyVaultUrl), new DefaultAzureCredential(true));
// Java
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();

SecretClient secretClient = new SecretClientBuilder()
    .vaultUrl("https://mysecretkeyvault.vault.azure.net")
    .credential(credential)
    .buildClient();
// JavaScript
const client = new SecretClient(keyVaultUrl, new DefaultAzureCredential());
# Python
client = SecretClient(vault_url, DefaultAzureCredential())

 

 

 

 

 

VisualStudioCredential

For .NET developers using Visual Studio 2017 or above, we are adding another credential VisualStudioCredential. Applications using this credential will be able to use the same account logged in to Azure from Visual Studio.

 

In your Visual Studio window, On the right top corner there should show your name or a "Sign in" link. Sign in or click on your name -> Account settings. Make sure your account is listed in the "All Accounts" section.

05122020-vs-accounts.png

Once you are logged in, in your application, your VisualStudioCredential will be able to pick up the user account logged in:

 

 

 

 

// .NET
var client = new SecretClient(new Uri(keyVaultUrl), new DefaultAzureCredential(true));

 

 

 

 

IntelliJCredential

For Java developers using IntelliJ IDEA, we are adding another credential IntelliJCredential. Applications using this credential will be able to use the same account logged in Azure Toolkit for IntelliJ. You will need IntelliJ IDEA 2019.1 or above and the latest Azure Toolkit for IntelliJ plugin.

In your IntelliJ window, open File -> Settings -> Plugins. Search "Azure Toolkit for IntelliJ" in the marketplace. Install and restart IDE.

Now you should be able to find a new menu item Tools -> Azure -> Azure Sign In...

05122020-intellij-sign-in.png

Device Login will help you login as a user account. Follow the instructions to login on the login.microsoftonline.com website with the device code. IntelliJ will prompt you to select your subscriptions. You are free to choose any you want - it doesn't matter for our use case.

 

Once you are logged in, in your application, your DefaultAzureCredential will be able to pick up the user account automatically on Mac or Linux:

 

 

 

 

DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();

SecretClient secretClient = new SecretClientBuilder()
    .vaultUrl("https://mysecretkeyvault.vault.azure.net")
    .credential(credential)
    .buildClient();

 

 

 

 

 

On Windows, sepcify the KeePass database path to read IntelliJ credentials. You can find the path in IntelliJ settings under File -> Settings -> Appearance & Behavior -> System Settings -> Passwords:

05122020-intellij-keepass.png

And pass the database path into the DefaultAzureCredentialBuilder:

 

 

 

 

DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
    .intelliJKeePassDatabasePath("C:\\Users\\jianghaolu\\AppData\\Roaming\\JetBrains\\IdeaIC2020.1\\c.kdbx")
    .build();

SecretClient secretClient = new SecretClientBuilder()
    .vaultUrl("https://mysecretkeyvault.vault.azure.net")
    .credential(credential)
    .buildClient();

 

 

 

 

 

Adjust which credentials are used in DefaultAzureCredential

With the increasing number of credentials in the DefaultAzureCredential chain and the automatic fallback to the next credential design, it's difficult to control and monitor which credential is actually being used. We are introducing a set of new ways to fine control which exceptions to exclude, when to fail and when to fallback to the next credential in chain, and how to monitor which credential is being used.

Exclude certain credentials

Sometimes, the environment we are running our applications in uses a credential sitting in the back of the chain. When DefaultAzureCredential searches for a credential to authenticate with, it will attempt a few other credentials to reach the one desired. This is not only slow, but could also pick up the wrong credential, or peeking into secure system data we'd like to avoid. In this release, you can now customize the chain by excluding any number of them when creating an instance of DefaultAzureCredential. For example, in my development environment I use VisualStudioCodeCredential and my application is deployed to a virtual machine in Azure where Managed Identity is available, I can create a DefaultAzureCredential as follows:

 

 

 

 

// .NET
var options = new DefaultAzureCredentialOptions
{
    ExcludeEnvironmentCredential = true,
    ExcludeManagedIdentityCredential = false,
    ExcludeSharedTokenCacheCredential = true,
    ExcludeVisualStudioCredential = true,
    ExcludeVisualStudioCodeCredential = false,
    ExcludeAzureCliCredential = true,
    ExcludeInteractiveBrowserCredential = true
};

var client = new SecretClient(new Uri(keyVaultUrl), new DefaultAzureCredential(options));
// Java
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
    .excludeEnvironmentCredential()
    .excludeSharedTokenCacheCredential()
    .excludeVsCodeCredential()
    .excludeIntelliJCredential()
    .build();

SecretClient secretClient = new SecretClientBuilder()
    .vaultUrl("https://mysecretkeyvault.vault.azure.net")
    .credential(credential)
    .buildClient();
# Python
credential = DefaultAzureCredential(
    exclude_environment_credential=True,
    exclude_shared_token_cache_credential=True,
    exclude_cli_credential=True
)
client = SecretClient(vault_url, credential)

 

 

 

 

The SecretClient created with the above code will only attempt authentication with ManagedIdentityCredential and VisualStudioCodeCredential. This feature is not available in JavaScript yet - similar configurations on what underlying credentials will be used to authenticate in a DefaultAzureCredential are coming soon for JavaScript.

Fail the authentication, don't try the next

When a credential fails to authenticate, DefaultAzureCredential automatically tries the next credential. This can cause problems when you partially configure a credential. For example, in the past, if the secret in the environment variable AZURE_CLIENT_SECRET expired, DefaultAzureCredential will try the other options. If you have accounts signed in VS Code or Azure CLI, DefaultAzureCredential may be using those accounts without you realizing it.

In the latest release, if the configuration is present for a credential, but authentication fails, the entire chain fails, resulting in a faster "fail". We achieve this by adding an exception type CredentialUnavailableException. DefaultAzureCredential will only attempt to authenticate with the next credential if a CredentialUnavailableException is thrown from the current credential. In the above example, if the environment variables are present but authentication failed, the EnvironmentCredential will not throw CredentialUnavailableException, causing DefaultAzureCredential to propagate the exception and stop trying other credentials.

Community acknowledgements

I'd like to give special thanks to Alejandro Baeza and Kiran Hegde for helping us improve the Azure Identity libraries on GitHub. Your contributions have helped many people and organizations succeed!

 

Working with us and giving feedback

So far, the community has filed hundreds of issues against these new SDKs with feedback ranging from documentation issues to API surface area change requests to pointing out failure cases. Please keep that coming. We work in the open on GitHub and you can submit issues here:

Finally, please keep up to date with all the news about the Azure developer experience programs and let us know how we are doing by following @AzureSDK on Twitter.