question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] [Azure ML] Retrieving secret in Azure ML SDK v2

See original GitHub issue

In the Azure ML Python SDK v1 a secret can be retrieved from the Azure Key Vault associated to the workspace using the following snippet:

from azureml.core import Run

secret = Run.get_context().get_secret("SECRET_NAME")

(see https://docs.microsoft.com/en-us/azure/machine-learning/how-to-use-secrets-in-runs).

However, I can’t seem to find an equivalent for this in v2 of the SDK. Will this still be added or is there another recommended solution for doing this?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tomasvanpottelberghcommented, Sep 5, 2022

The use case would be to get the credentials for a Service Principal which is used to access some data sources. As far as I can see, this is the only way to make a certain resource available to the whole Azure ML workspace, regardless of the compute instance or cluster the job is run. Is this correct or is there a better way without having to use the v1 SDK?

0reactions
luigiwcommented, Nov 30, 2022

@tomasvanpottelbergh you can use the workspace level MSI and grant access to that MSI. I’ll ask around to see if there’re any examples.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authentication secrets - Azure Machine Learning
The Azure Key Vault allows you to securely store and retrieve secrets. In this article, learn how you can retrieve secrets stored in...
Read more >
Azure ML Python SDK Unable to get MSI token using identity ...
I've been using the Azure ML Python SDK to create pipelines for weeks now, but all of the sudden I started getting this...
Read more >
How To Authenticate Into Azure Machine Learning Using The ...
This article will show you how to authenticate in Azure ML using different technologies in order to get the reference to a Workspace...
Read more >
Hidden tricks for running AutoML experiment from Azure ...
Step 2: Installing the Azure Machine Learning SDK for Python. pip install azureml-sdk. The SDK includes optional extras that aren't required for ...
Read more >
Azure ML: Reading from and Writing to Azure SQL DB
Not too long ago, I worked through an interesting issue with Azure Machine Learning. The question was, what's the best way to read...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found