Share via

How to use Synapse pipeline to send alert email using Python notebook, but hide username and password to mail server.

2024-10-22T14:31:12.97+00:00

I have been asked to create a notebook that can be included in a Synapse pipeline to send alert emails. The examples I have seen use the mail server credentials in the python script. How do I hide these? Server is Outlook.

Thanks in advance

Azure Synapse Analytics
Azure Synapse Analytics

An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.


Answer accepted by question author

hossein jalilian 13,360 Reputation points Volunteer Moderator
2024-10-22T16:53:17.81+00:00

Thanks for posting your question in the Microsoft Q&A forum.

You can use Azure Key Vault to store and retrieve the sensitive information.

  • Create secrets in Azure Key Vault for your email username and password.
  • Ensure your Synapse workspace has access to the Key Vault.
  • Create a linked service in Synapse that connects to your Key Vault.
  • Use the Synapse SDK to access the Key Vault secrets.
  • Use the retrieved credentials to authenticate and send the email.

Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.