CORS policy: Permission was denied for this request to access the `unknown` address space.

Ponnathithan, Divya 0 Reputation points
2025-12-15T13:27:33.11+00:00

Hi,

We are experiencing the same issue discussed on this link https://learn.microsoft.com/en-us/answers/questions/5604651/cannot-view-data-in-the-azure-cosmos-db-data-explo on MS Edge (ver:143.0.3650.80) and also Chrome (ver:142.0.7444.176) browsers.

Error: from origin 'https://cosmos.azure.com' has been blocked by CORS policy: Permission was denied for this request to access the unknown address space.

the suggested settings in the ref link didn't help to resolve the issue.

Could you advise on the next steps to fix this? Appreciate your help!

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-15T13:27:54.1033333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error message you are encountering indicates that the CORS policy is blocking your request due to permission issues with accessing the specified address space. Here are some steps you can take to troubleshoot and potentially resolve the issue:

    1. Verify CORS Settings: Ensure that you have correctly configured the CORS settings in your Azure Cosmos DB account. You need to specify the allowed origins in the allowedOrigins header. Make sure that the origin https://cosmos.azure.com is included in your CORS configuration.
    2. Check Browser Console: Use the browser's developer tools (F12) to check for any additional error messages or details in the console that might provide more context about the CORS issue.
    3. Preflight Requests: If your request is complex (e.g., it uses custom headers or methods), ensure that your server is correctly handling preflight requests. The server should respond to OPTIONS requests with the appropriate CORS headers.
    4. Allowed Methods and Headers: Make sure that the CORS policy allows the HTTP methods (GET, POST, etc.) and headers that your application is trying to use. You may need to explicitly allow specific headers using the WithHeaders method in your CORS policy configuration.
    5. Testing with Different Browsers: Since you mentioned that the issue occurs in both Edge and Chrome, try testing in a different browser or in incognito mode to rule out any caching issues or extensions that might interfere with the request.
    6. Review Documentation: Consult the Azure Cosmos DB documentation on CORS to ensure that you have followed all necessary steps for configuration.

    If these steps do not resolve the issue, consider reaching out to Azure support for further assistance.


    References:


  2. VRISHABHANATH PATIL 4,825 Reputation points Microsoft External Staff Moderator
    2025-12-26T07:01:56.87+00:00

    Hi

    Thanks for reaching out to Microsoft Q&A! Here’s a step-by-step guide to help you fix the issue.

    The error message you're seeing suggests that permission for the request was denied because of how the CORS settings are configured.

    Here’s what you can do to troubleshoot and potentially fix the issue:

    Head over to your Azure Cosmos DB account in the Azure portal and find the CORS settings page.

    Make sure the origin URL you're trying to access (e.g., https://cosmos.azure.com) is listed in the allowed origins. If it’s missing, add it in as a comma-separated entry. If you're just testing, you can use * to allow all origins.

    Go to the Networking section of your Cosmos DB account and check if the Public network access toggle is enabled. If it’s set to "Disabled," your requests will be blocked.

    Also, make sure your client IP is included in the IP firewall rules, so it can connect.

    Since the issue occurs on MS Edge and Chrome, make sure both browsers are up-to-date. CORS behavior can sometimes change with different browser versions or updates, so this is worth checking.

    Ensure you're using the right Azure Cosmos DB API for your app. CORS is supported for the NoSQL API and some others, but it may not work with APIs that don’t support CORS. Double-check that you're using the correct one.

    Look through the official documentation on how to configure CORS. This will help make sure you're setting everything up correctly, especially if your app has its own CORS-related settings or restrictions.

    If you’re still having trouble after trying these steps, here are some additional questions to help figure out what's going wrong:

    • Have you saved and applied the CORS settings correctly in Azure?
    • Which specific origins are you allowing in your CORS configuration?
    • Are there any network-level restrictions or policies that could be blocking the requests?
    • Are you using any proxies or additional layers that might interfere with the CORS headers?

    KB articles:


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.