Forum Discussion
Call semPy libraries as service principal
- Anonymous1 year ago
HI Anonymous,
After I double checked these credentials that we provide in the notebook. It seems not really used for the sempy functions authorizations.
They only initialed for Fabric RestClient and corresponding functions uses. For the default sempy functions, they still invoked the current user credentials that notebook and its sessions cached.
Regards,
Xiaoxin Sheng
Hi Anonymous,
Perhaps you can tried to use azure keyvault to get the service principal credentials and use in notebook:
secret = mssparkutils.credentials.getSecret('https://key-vault-datasarva.vault.azure.net/', 'secret-value')
Using Azure Key Vault in Microsoft Fabric Notebooks
Regards,
Xiaoxin Sheng
- Anonymous1 year agoNot applicable
Hi Anonymous
I have incorporated your suggestion, meaning my client secret now looks like this:
client_secret = mssparkutils.credentials.getSecret('https://my-key-vault.vault.azure.net/', 'My-Secret-Name')Unfortunately it hasn't worked. I think there's a complete disconnect between the authentication at the start of my script setting up my fabric client authentication, and the next code segment that calls the fabric.list_datasets method.How can I connect the two, so that when fabric.list_datasets is called, it will use the authentication in the code above? At present its still using my account as my script works when I use a workspace ID that my account has access to, but fails when I use a workspace ID that my account does not have access to.- Anonymous1 year agoNot applicable
HI Anonymous,
After I double checked these credentials that we provide in the notebook. It seems not really used for the sempy functions authorizations.
They only initialed for Fabric RestClient and corresponding functions uses. For the default sempy functions, they still invoked the current user credentials that notebook and its sessions cached.
Regards,
Xiaoxin Sheng