惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
H
Help Net Security
量子位
The Cloudflare Blog
博客园 - Franky
博客园 - 聂微东
博客园 - 司徒正美
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
有赞技术团队
有赞技术团队
罗磊的独立博客
GbyAI
GbyAI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
MongoDB | Blog
MongoDB | Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
You Can Probably Use Claude Code for Free at Work
Louis Liu · 2026-05-13 · via DEV Community

If your company has already deployed Claude models on Microsoft Foundry, you can basically use Claude Code for free and save $17/month on a Claude subscription.

Check Your Access to Foundry

Microsoft Foundry (formerly Azure AI Studio) is a unified, enterprise-grade AI platform-as-a-service designed for developers to build, customize, and deploy AI applications and agents.

  1. Go to https://ai.azure.com/nextgen
  2. Click Build on the top navigation bar
  3. Click Models in the side menu

Make sure your organization already has Claude models deployed in Foundry (for example claude-opus-4-7).


Connect Foundry Models to Claude Code

I recommend using Entra ID + Azure CLI authentication. It's safer and more convenient than managing API keys manually.

Install Azure CLI before continuing:

After installing Azure CLI, sign in with:

az login

Enter fullscreen mode Exit fullscreen mode

Set the following environment variables to enable Microsoft Foundry integration in Claude Code.

I usually put them in my .zshrc.

# Enable Microsoft Foundry integration
export CLAUDE_CODE_USE_FOUNDRY=1

# Azure resource name (replace {resource} with your resource name)
export ANTHROPIC_FOUNDRY_RESOURCE={resource}

# Or provide the full base URL:
# export ANTHROPIC_FOUNDRY_BASE_URL=https://{resource}.services.ai.azure.com/anthropic

Enter fullscreen mode Exit fullscreen mode

In the current Foundry UI, resource are renamed to project.

Set the model variables to match your deployment names.

By default, the opus alias on Foundry may still resolve to Opus 4.6. To make sure Claude Code uses Opus 4.7, explicitly set:

export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7'
export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5'

Enter fullscreen mode Exit fullscreen mode


Common Issues

Wrong Azure tenant

If your company uses multiple Azure tenants, az login may authenticate against the wrong one.

Check your current tenant with:

az account show

Enter fullscreen mode Exit fullscreen mode

Switch tenants if needed:

az login --tenant <tenant-id>

Enter fullscreen mode Exit fullscreen mode

Deployment name mismatch

The model name in Claude Code must match the deployment name configured in Foundry.

For example:

export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7'

Enter fullscreen mode Exit fullscreen mode

must exactly match the deployment name shown in the Foundry Models page.


Side Notes

Some companies provide Azure subscriptions or enterprise credits for internal development.

So even if your IT team has not deployed Claude models yet, you may still be able to deploy them yourself.

Just make sure you have permission before creating resources.