Forum Discussion
Eddykleinjan
1 year agoFrequent Visitor
Secure Key Vault access without Workspace Identity
Hi, I'm ready to dive into the first real Fabric project getting data from a specific app's API. This requires using secrets to access the soure data app's API. I don't want to store these secrets i...
- 1 year ago
Perhaps you can use this:
https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-utilities#credentials-utilities
frithjof_v
1 year agoCommunity Champion
Perhaps you can use this:
https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-utilities#credentials-utilities
- Eddykleinjan1 year agoFrequent Visitor
Thanks for the pointer, that works! It reads the value from the Key Vault both when run interactively and when running the notebook scheduled.
When running the notebook scheduled, it seems to run under the account that has created the schedule for the notebook. That way the scheduled notebook run could read the secret from the Azure Key Vault.
test_secret = notebookutils.credentials.getSecret('https://<url_to_key_vault>/', '<secret_name>') # Reverse the value in order to show it. Otherwise it will be shown as '[REDACTED]' reversed_string = test_secret[::-1] print (f"Secret value reversed: {reversed_string}")