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

Update Azure Queue storage trigger for Azure Functions to fix wrong instructions for local development #125513

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tanguySnoeck
Copy link

@tanguySnoeck tanguySnoeck commented Jan 14, 2025

The documentation states that:

_When you're running your function project locally, the above configuration tells the runtime to use your local developer identity. The connection attempts to get a token from the following locations, in order:

  • A local cache shared between Microsoft applications
  • The current user context in Visual Studio
  • The current user context in Visual Studio Code
  • The current user context in the Azure CLI_

In the aforementioned section, the "above configuration" most likely refers to this part of the article:

Token Credential <CONNECTION_NAME_PREFIX>__credential Defines how a token should be obtained for the connection. This setting should be set to managedidentity if your deployed Azure Function intends to use managed identity authentication. This value is only valid when a managed identity is available in the hosting environment.

However, using this value locally doesn't work and the following error message is returned by the azure function runtime:
Azure.Identity: ManagedIdentityCredential authentication unavailable. Multiple attempts failed to obtain a token from the managed identity endpoint. Azure.Core: Retry failed after 6 tries. Retry settings can be adjusted in ClientOptions.Retry or by configuring a custom retry policy in ClientOptions.RetryPolicy. (A socket operation was attempted to an unreachable network. (169.254.169.254:80)), indicating that the local environment is trying to connect to the managed identity endpoint located at 169.254.169.254:80.

However, using the value defaultazurecredential instead of managedidentity for the <CONNECTION_NAME_PREFIX>__credential property proved to be working as expected and shows the behaviour currently expected from the documentation, i.e.,

_The connection attempts to get a token from the following locations, in order:

  • A local cache shared between Microsoft applications
  • The current user context in Visual Studio
  • The current user context in Visual Studio Code
  • The current user context in the Azure CLI_

Thank you in advance for processing.

Copy link
Contributor

@tanguySnoeck : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Contributor

Learn Build status updates of commit c6a5943:

✅ Validation status: passed

File Status Preview URL Details
articles/azure-functions/functions-reference.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@ttorble
Copy link
Contributor

ttorble commented Jan 14, 2025

@ggailey777

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged tracking label for the PR review team label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants