Meghan Clark
Did you get a chance to see the response from Rahul? In addition to the troubleshooting steps suggested, please see below.
When I go to the IoT Hub page to set up the custom Cosmos DB endpoint, under "Choose an Existing Cosmos DB Account" I can select my Cosmos DB for Mongo API instance from the dropdown menu, but then in the database dropdown it says "No available items."
Looks like you are not getting the below fields while adding a route.
Can you confirm if you have added the Database and collections to Your Cosmos DB? Both the resources in same subscription or different subscription?
If the endpoint resource is in a different subscription than your IoT hub, you need to configure your IoT hub as a trusted Microsoft service before creating a custom endpoint. When you do create the custom endpoint, set the Authentication type to user-assigned identity.
For more information, see Egress connectivity from IoT Hub to other Azure resources.
If they are in same subscription and region, try refreshing the database dropdown by clicking the refresh button to see if it resolves the issue.
You can specify the partition key property name in Partition key name. The partition key property name is defined at the container level and can't be changed once it has been set.
If you're using the system assigned managed identity for authenticating to Cosmos DB, you must use Azure CLI or Azure PowerShell to assign the Cosmos DB Built-in Data Contributor built-in role definition to the identity. Role assignment for Cosmos DB isn't currently supported from the Azure portal. For more information about the various roles, see Configure role-based access for Azure Cosmos DB. To understand assigning roles via CLI, see Manage Azure Cosmos DB SQL role resources.
If you need further help in this matter, please comment in the below section and we are happy to discuss!
If this answers your query, do click Accept Answer and Yes for this answer as helpful. And, if you have any further query do let us know by commenting in the below section.