'How to parse [REDACTED] of a key vault value into json string in Azure Notebook
I am trying to access 2 values from Azure key vault. But it is not getting parsed correctly.
I am expected the hdr value as
{'Content-Type': 'application/json', 'client_id': '890fy6', 'client_secret': '765r4'}
Below is my code
clientID_KV = dbutils.secrets.get(scope = 'My-Scopes-{}'.format(env_name), key = 'CID') clientSecret_KV = dbutils.secrets.get(scope = 'My-Scopes-{}'.format(env_name), key = 'CS')
hdr = {'Content-Type' : 'application/json', 'client_id' : clientID_KV , 'client_secret' : clientSecret_KV} print(hdr)
Output
{'Content-Type': 'application/json', 'client_id': '[REDACTED]', 'client_secret': '[REDACTED]'}
But I am able to get the values printed using
displayHTML("".join(clientID_KV)) displayHTML("".join(clientSecret_KV))
but not through json.
Could someone please help here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
