Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Greetings everyone,
I am trying to establish a connection between my Microsoft Fabric notebook and an Azure KeyVault to access some secrets. Unfortunately, I am facing an issue with MSI while using Power BI, as it keeps timing out when trying to obtain a token. Any suggestions on how to resolve this issue would be greatly appreciated. Thank you.
Solved! Go to Solution.
@datakohai12 Thanks for sharing the steps Fabric currently does not support managed identity authentication which is what this is trying to authenticate via. Until that's fully integrated, there's a simple workaround. As long as you are executing notebook has access to the vault, the below will work.
from trident_token_library_wrapper import PyTridentTokenLibrary as tl
access_token = mssparkutils.credentials.getToken("keyvault")
tl.get_secret_with_token("https://vaultName.vault.azure.net/","secretName",access_token)
Regards
Geetha
@datakohai12 It wouldn't be present in pypi
you should be able to execute that code directly in your Trident notebook if you're not able to send over a screenshot of the error.
Regards
Geetha
@datakohai12 Thanks for sharing the steps Fabric currently does not support managed identity authentication which is what this is trying to authenticate via. Until that's fully integrated, there's a simple workaround. As long as you are executing notebook has access to the vault, the below will work.
from trident_token_library_wrapper import PyTridentTokenLibrary as tl
access_token = mssparkutils.credentials.getToken("keyvault")
tl.get_secret_with_token("https://vaultName.vault.azure.net/","secretName",access_token)
Regards
Geetha
I have used the above code to mount the data lake gen2 using notebook in microsoft fabric and getting below error - An error occurred while calling o4394.getSecretWithToken. : java.io.IOException: 401 {"error":{"code":"Unauthorized","message":"AKV10032: Invalid issuer.
Hi Geetha,
I apologize for the delayed response. Thanks for the workaround; I am using it now, though I am having trouble finding trident_token_library_wrapper. Could you direct me to it in PyPi?
@datakohai12 It wouldn't be present in pypi
you should be able to execute that code directly in your Trident notebook if you're not able to send over a screenshot of the error.
Regards
Geetha
Interesting is now working. Thanks.
Good to hear that it is now working for you,
Thanks for visiting Fabric Community have a great day!
Regards
Geetha
Hi @datakohai12 Thanks for posting your question in Microsoft Fabric Community
Can you please share the steps you have followed or any screenshot of the error.
Regards
Geetha
Hi,
The following are my steps:
Here is a screenshot of the code and the error message: