How can i host Claude on a Azure Virtual machine to create an automation use case for my company

bagh, sukriti 0 Reputation points
2026-06-03T19:13:24.83+00:00

I am working on creating an agent to automate recruitment process for my company where i wouls like to scan Linkedin to see profiles of candidates which are suitable for my company's hiring requirement , match profile and send them interview requests. Which can be done privately on Claude (AI by Anthropic) is there a way i can securely mirror the same automation for my company using below method ?-

  1. Hosted / browser-based — an approved cloud automation tool plus an approved LLM API, accessed entirely through the browser. Nothing installed locally. 2. Self-hosted — a company-provisioned VM or server (Docker-based, ~8GB+ RAM, ideally a GPU) that I'd access via RDP/SSH/VDI, keeping all data inside our perimeter.

Ask - is there a possibility to integrate Claude or any other AI to be hosted on Azure VM ? If yes please add the link of the process how it can be done or if someone has tried it before or Azure VM is not at all needed.

Azure AI Search
Azure AI Search

An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.


2 answers

Sort by: Most helpful
  1. Anshika Varshney 15,535 Reputation points Microsoft External Staff Moderator
    2026-06-05T10:25:04.94+00:00

    Hi @bagh, sukriti

    Azure Virtual Machines aren't needed to "host" Claude itself. Claude models are offered as a managed service through Microsoft Foundry (formerly Azure AI Foundry), and your automation agent can call them securely from anywhere including code running on an Azure VM.

    Recommended architecture for your recruitment automation

    Component Where it runs How it works
    --------
    Claude models (Opus/Sonnet/Haiku) Microsoft Foundry (managed) Deploy via the Foundry model catalog; no infrastructure to manage
    Automation agent (LinkedIn scanning, profile matching, interview requests) Azure VM / Azure Functions / Container Python or .NET code that calls Claude's Messages API
    Authentication Azure Entra ID or API key Use DefaultAzureCredential or API key from Foundry's Endpoints & keys page

    Step-by-step setup

    1. Deploy Claude in Microsoft Foundry
      • Go to the Microsoft Foundry portal
      • From the catalog, deploy Claude Sonnet 4.5, Claude Haiku 4.5, or Claude Opus 4.1[anthropic]
      • These are available in public preview, serverless (Anthropic manages the infrastructure) [anthropic]
    2. Get API access
      • In your Foundry resource: Endpoints and keys → copy the API key[code.claude]
      • Or use Entra ID authentication with DefaultAzureCredential
    3. Set environment variables on your VM (or agent runtime)
         bash
         export ANTHROPIC_API_KEY="<your-foundry-api-key>"
      

    export ANTHROPIC_RESOURCE="<your-foundry-project-name>" export ANTHROPIC_DEPLOYMENT_NAME="claude-sonnet-4-5"

       
    1. **Call Claude from your automation code** Use the official Anthropic SDK (Python example):
    
       ```python
       python
       from
    

    [platform.claude]

    1. Deploy your agent
      • Run the agent on your Azure VM, or use Azure Functions, Container Apps, or AKS
      • The VM is only for your application logic, not for hosting the model itself

    Additional resources

    This pattern lets you build your recruitment automation agent securely on Azure while leveraging Claude's capabilities through Microsoft's enterprise-grade managed service.

    I Hope this helps. Do let me know if you have any further queries.

    Thankyou!

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. AI answer

    2026-06-03T19:13:45.84+00:00

    Azure Virtual Machines are not required to “host” Claude itself. Instead, Claude models are provided as a managed service through Microsoft Foundry, and applications or agents can call those models securely from within the company environment.

    A secure architecture for the described automation can be built as follows:

    1. Use Claude models via Microsoft Foundry
      • Deploy Claude models in Microsoft Foundry. Claude Opus, Sonnet, and Haiku families are available as managed models.
      • Authenticate using Microsoft Entra ID or API keys, and call the Claude Messages API from application code (for example, a .NET or Python agent) running in the company environment.
      • This keeps model inference on Azure infrastructure while data stays within the organization’s compliance boundary.
    2. Build an agent using the Microsoft Agent Framework
      • Create an Anthropic-based agent using the Microsoft Agent Framework and the Anthropic provider packages.
      • For Azure Foundry, configure environment variables such as ANTHROPIC_RESOURCE, ANTHROPIC_API_KEY (or Azure credentials), and ANTHROPIC_DEPLOYMENT_NAME (for example, claude-haiku-4-5).
      • The agent can then call Claude models to perform tasks like profile analysis, matching, and drafting outreach messages.
    3. Hosting options for the agent
      • The agent does not need to run directly on a VM; it can be hosted using standard options such as:
        • Azure Functions (Durable) for serverless, long-running workflows.
        • OpenAI-compatible endpoints or A2A protocol for integration with other systems.
      • If a self-hosted pattern is required, the agent runtime can be deployed on an Azure VM or container, but the Claude model itself remains in Foundry.
    4. Using Claude Code or Claude Desktop in enterprise scenarios
      • For development workflows, Claude Code (CLI or VS Code extension) and Claude Desktop can be configured to use Microsoft Foundry as the inference provider. This ensures all Claude requests are routed through the organization’s Foundry resource, with billing on the Azure account and data remaining within enterprise boundaries.

    In summary, Claude is integrated as a managed model in Microsoft Foundry rather than being fully self-hosted on an Azure VM. The automation agent and surrounding services can run on Azure Functions, containers, or VMs, while securely calling Claude through Foundry using enterprise-grade security and private networking.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer 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.