Mitra, Saikat, your application is getting the certificate error because Python environment doesn’t trust the company’s Zscaler root certificate by default. To fix this, you need to set the environment about the Zscaler certificate so it can make secure connections to Azure AI Search without failing.
- Get the Zscaler root certificate file (
.crt
or.pem
) from the IT team or export it from the browser’s trusted root certificates. - Set an environment variable called
SSL_CERT_FILE
to the path of that certificate file.
For Windows (Command Prompt):
set SSL_CERT_FILE=C:\path\to\zscaler_root_ca.crt
For Windows (PowerShell):
$env:SSL_CERT_FILE = "C:\path\to\zscaler_root_ca.crt"
For Linux or Mac:
export SSL_CERT_FILE=/path/to/zscaler_root_ca.crt
- Restart your application or shell to pick up the new environment variable.
Once you do this, Python will trust SSL connections that have been intercepted and re-signed by Zscaler, and your Azure AI Search API calls should work as expected.
Hope it helps!
Kindly please do not forget to click "Accept the answer” and Yes
wherever the information provided helps you, this can be beneficial to other community members.