Hello @Bhagyashri Nivdunge,
Welcome to the MS Q&A platform.
From your issue, It seems like you have restricted access to selected networks and have not selected. 'Accept connections from within public Azure data centers.
When you select 'Accept connections from within public Azure datacenters,' all Azure services should Accept connections from within public Azure datacenters.
(Or) your datafactory is not in the same Vnet as the cosmos DB account.
To resolve this:
Method1:
You can add the ADF in the same Vnet (or) white-list the data factory IP address. But ADF will keep on adding the IP addresses, so it's hard to track and add IP addresses.
The best approach is to configure Vnet service endpoint of data factory and cosmos DB
You can follow the below steps:
Create a Vnet and Subnet and add a firewall rule in your cosmos DB to allow traffic only from the subnet of the Vnet
and configure the ADF to use the same Vnet and the subnet.
Method2:
use Azure Private Link to securely access your Cosmos DB account from your Data Factory. Azure Private Link enables you to access Azure PaaS Services (like Cosmos DB) over a private endpoint in your virtual network.
Below is the document for private endpoints.
How to configure firewall for cosmos DB: https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-configure-firewall
I hope this helps. Please let me know if you have any further questions.
If this answers your question, please consider accepting the answer by hitting the Accept answer and up-vote as it helps the community look for answers to similar questions