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

Azure Government Support #15

Closed
shmack01 opened this issue May 18, 2021 · 4 comments
Closed

Azure Government Support #15

shmack01 opened this issue May 18, 2021 · 4 comments

Comments

@shmack01
Copy link

This is a great extension, but it doesn't pick up the current Azure Account environment setting, such as APIM, Function Apps, etc. In VS Code, when you are signed in with the "Azure Account" extension for Azure Government the following error occurs:

Error: The access token has been obtained for wrong audience or resource 'https://management.core.windows.net/". It should exactly match with one of the allowed audiences 'https://management.core.usgovclientapi.net"....

image

@dereklegenzoff
Copy link
Contributor

Hi @shmack01 - thanks for reporting this.

I've attached an updated version of the extension (gov-friendly-vscode-azurecognitivesearch.zip) for you with a small tweak that will make this work for gov cloud. To install it:

  1. Download the file and open VS Code
  2. Unzip the folder
  3. Press Cntrl + Shift + P to open up the command palette
  4. Type "Install from VSIX" and select that command. Navigate to the VSIX file and select it

After installing the extension, please make sure the settings of the Azure Account extension look like this:
image

And that the settings for the Azure Cognitive Seach extension (Settings -> Extensions -> Azure Cognitive Search) look like this:
image

Could you let me know if that works for you?

@dereklegenzoff
Copy link
Contributor

In case you're wondering, the updated extension I attached changes the value of this line to point to search.azure.us from search.windows.net.

I will try to get an update in so this is a better experience and doesn't require a separate version of the extension.

@shmack01
Copy link
Author

Works perfectly! Thank you for adding the update for the US Gov endpoint.

@dereklegenzoff
Copy link
Contributor

Awesome, glad to hear it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants