Official agent skill

Azure Communication Common Java

by microsoft in microsoft/skills

Azure Communication Services common utilities for Java. An agent skill from microsoft/skills.

OfficialMITAuto-check passedBackend & APIs

Install Azure Communication Common Java

skills CLI
$ npx skills add microsoft/skills --skill azure-communication-common-java -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/skills azure-communication-common-java --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/plugins/azure-sdk-java/skills/azure-communication-common-java .claude/skills/azure-communication-common-java && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
azure-communication-common-java
GitHub stars
3.1k
Used in
6 other repos
Token cost
~2.4k tokens
SKILL.md length
155 words
Files
2 (incl. references)
Skills in repo
150
Repo updated
First seen
Licence
MIT

At a glance

Azure Communication Services common utilities for Java. An agent skill from microsoft/skills.

  • Works in 5 steps: Proactive Refresh - Always use… → Token Security - Never log or expose… → Close Credentials - Dispose of… → …
  • Working with CommunicationTokenCredential
  • SKILL.md covers Installation, Key Concepts, CommunicationTokenCredential and Entra ID (Azure AD)…, plus 10 more sections
  • Reaches auth.msft.communication.azure.com; needs AZURE_COMMUNICATION_USER_TOKEN

What it does

Azure Communication Common Java is an agent skill from microsoft/skills, published by the product's own GitHub organization. Azure Communication Services common utilities for Java. Use when working with CommunicationTokenCredential, user identifiers, token refresh, or shared authentication across ACS services.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/examples.md`).

It sits in Backend & APIs, covering Authentication. It works with Azure Communication Services and Java. The repository describes itself as: Skills, MCP servers, Custom Agents, Agents.md for SDKs to ground Coding Agents. The licence is MIT.

When your agent uses it

  • Working with CommunicationTokenCredential
  • User identifiers
  • Shared authentication across ACS services

Example prompts

  • “/azure-communication-common-java”

Requirements

  • A credential in AZURE_COMMUNICATION_USER_TOKEN

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Proactive Refresh - Always use setRefreshProactively(true) for long-lived clients
  2. Token Security - Never log or expose full tokens
  3. Close Credentials - Dispose of credentials when no longer needed
  4. Error Handling - Handle token refresh failures gracefully
  5. Identifier Types - Use specific identifier types, not raw strings

What it can do on your machine

Read from SKILL.md and the folder at commit 354361d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are java, xml and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • auth.msft.communication.azure.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AZURE_COMMUNICATION_USER_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Azure Communication Common Java loads about 2.4k tokens when it runs, and up to ~6.1k if it reads all its reference files. Until then it costs about 55 tokens; SKILL.md has 155 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/skills at commit 354361d, republished under its MIT licence (© microsoft). 155 words, ~2,420 tokens.

Download SKILL.mdSave it as .claude/skills/azure-communication-common-java/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
azure-communication-common-java
description
Azure Communication Services common utilities for Java. Use when working with CommunicationTokenCredential, user identifiers, token refresh, or shared authentication across ACS services.
license
MIT
metadata.author
Microsoft
metadata.version
1.0.0
metadata.package
com.azure:azure-communication-common

Azure Communication Common (Java)

Shared authentication utilities and data structures for Azure Communication Services.

Installation

xml
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-communication-common</artifactId>
    <version>1.4.0</version>
</dependency>

Key Concepts

ClassPurpose
CommunicationTokenCredentialAuthenticate users with ACS services
CommunicationTokenRefreshOptionsConfigure automatic token refresh
CommunicationUserIdentifierIdentify ACS users
PhoneNumberIdentifierIdentify PSTN phone numbers
MicrosoftTeamsUserIdentifierIdentify Teams users
UnknownIdentifierGeneric identifier for unknown types

CommunicationTokenCredential

Static Token (Short-lived Clients)
java
import com.azure.communication.common.CommunicationTokenCredential;

// Simple static token - no refresh
String userToken = "<user-access-token>";
CommunicationTokenCredential credential = new CommunicationTokenCredential(userToken);

// Use with Chat, Calling, etc.
ChatClient chatClient = new ChatClientBuilder()
    .endpoint("https://<resource>.communication.azure.com")
    .credential(credential)
    .buildClient();
Proactive Token Refresh (Long-lived Clients)
java
import com.azure.communication.common.CommunicationTokenRefreshOptions;
import java.util.concurrent.Callable;

// Token refresher callback - called when token is about to expire
Callable<String> tokenRefresher = () -> {
    // Call your server to get a fresh token
    return fetchNewTokenFromServer();
};

// With proactive refresh
CommunicationTokenRefreshOptions refreshOptions = new CommunicationTokenRefreshOptions(tokenRefresher)
    .setRefreshProactively(true)      // Refresh before expiry
    .setInitialToken(currentToken);    // Optional initial token

CommunicationTokenCredential credential = new CommunicationTokenCredential(refreshOptions);
Async Token Refresh
java
import java.util.concurrent.CompletableFuture;

// Async token fetcher
Callable<String> asyncRefresher = () -> {
    CompletableFuture<String> future = fetchTokenAsync();
    return future.get();  // Block until token is available
};

CommunicationTokenRefreshOptions options = new CommunicationTokenRefreshOptions(asyncRefresher)
    .setRefreshProactively(true);

CommunicationTokenCredential credential = new CommunicationTokenCredential(options);

Entra ID (Azure AD) Authentication

java
import com.azure.identity.InteractiveBrowserCredentialBuilder;
import com.azure.communication.common.EntraCommunicationTokenCredentialOptions;
import java.util.Arrays;
import java.util.List;

// For Teams Phone Extensibility
InteractiveBrowserCredential entraCredential = new InteractiveBrowserCredentialBuilder()
    .clientId("<your-client-id>")
    .tenantId("<your-tenant-id>")
    .redirectUrl("<your-redirect-uri>")
    .build();

String resourceEndpoint = "https://<resource>.communication.azure.com";
List<String> scopes = Arrays.asList(
    "https://auth.msft.communication.azure.com/TeamsExtension.ManageCalls"
);

EntraCommunicationTokenCredentialOptions entraOptions = 
    new EntraCommunicationTokenCredentialOptions(entraCredential, resourceEndpoint)
        .setScopes(scopes);

CommunicationTokenCredential credential = new CommunicationTokenCredential(entraOptions);

Communication Identifiers

CommunicationUserIdentifier
java
import com.azure.communication.common.CommunicationUserIdentifier;

// Create identifier for ACS user
CommunicationUserIdentifier user = new CommunicationUserIdentifier("8:acs:resource-id_user-id");

// Get raw ID
String rawId = user.getId();
PhoneNumberIdentifier
java
import com.azure.communication.common.PhoneNumberIdentifier;

// E.164 format phone number
PhoneNumberIdentifier phone = new PhoneNumberIdentifier("+14255551234");

String phoneNumber = phone.getPhoneNumber();  // "+14255551234"
String rawId = phone.getRawId();              // "4:+14255551234"
MicrosoftTeamsUserIdentifier
java
import com.azure.communication.common.MicrosoftTeamsUserIdentifier;

// Teams user identifier
MicrosoftTeamsUserIdentifier teamsUser = new MicrosoftTeamsUserIdentifier("<teams-user-id>")
    .setCloudEnvironment(CommunicationCloudEnvironment.PUBLIC);

// For anonymous Teams users
MicrosoftTeamsUserIdentifier anonymousTeamsUser = new MicrosoftTeamsUserIdentifier("<teams-user-id>")
    .setAnonymous(true);
UnknownIdentifier
java
import com.azure.communication.common.UnknownIdentifier;

// For identifiers of unknown type
UnknownIdentifier unknown = new UnknownIdentifier("some-raw-id");

Identifier Parsing

java
import com.azure.communication.common.CommunicationIdentifier;
import com.azure.communication.common.CommunicationIdentifierModel;

// Parse raw ID to appropriate type
public CommunicationIdentifier parseIdentifier(String rawId) {
    if (rawId.startsWith("8:acs:")) {
        return new CommunicationUserIdentifier(rawId);
    } else if (rawId.startsWith("4:")) {
        String phone = rawId.substring(2);
        return new PhoneNumberIdentifier(phone);
    } else if (rawId.startsWith("8:orgid:")) {
        String teamsId = rawId.substring(8);
        return new MicrosoftTeamsUserIdentifier(teamsId);
    } else {
        return new UnknownIdentifier(rawId);
    }
}

Type Checking Identifiers

java
import com.azure.communication.common.CommunicationIdentifier;

public void processIdentifier(CommunicationIdentifier identifier) {
    if (identifier instanceof CommunicationUserIdentifier) {
        CommunicationUserIdentifier user = (CommunicationUserIdentifier) identifier;
        System.out.println("ACS User: " + user.getId());
        
    } else if (identifier instanceof PhoneNumberIdentifier) {
        PhoneNumberIdentifier phone = (PhoneNumberIdentifier) identifier;
        System.out.println("Phone: " + phone.getPhoneNumber());
        
    } else if (identifier instanceof MicrosoftTeamsUserIdentifier) {
        MicrosoftTeamsUserIdentifier teams = (MicrosoftTeamsUserIdentifier) identifier;
        System.out.println("Teams User: " + teams.getUserId());
        System.out.println("Anonymous: " + teams.isAnonymous());
        
    } else if (identifier instanceof UnknownIdentifier) {
        UnknownIdentifier unknown = (UnknownIdentifier) identifier;
        System.out.println("Unknown: " + unknown.getId());
    }
}

Token Access

java
import com.azure.core.credential.AccessToken;

// Get current token (for debugging/logging - don't expose!)
CommunicationTokenCredential credential = new CommunicationTokenCredential(token);

// Sync access
AccessToken accessToken = credential.getToken();
System.out.println("Token expires: " + accessToken.getExpiresAt());

// Async access
credential.getTokenAsync()
    .subscribe(token -> {
        System.out.println("Token: " + token.getToken().substring(0, 20) + "...");
        System.out.println("Expires: " + token.getExpiresAt());
    });

Dispose Credential

java
// Clean up when done
credential.close();

// Or use try-with-resources
try (CommunicationTokenCredential cred = new CommunicationTokenCredential(options)) {
    // Use credential
    chatClient.doSomething();
}

Cloud Environments

java
import com.azure.communication.common.CommunicationCloudEnvironment;

// Available environments
CommunicationCloudEnvironment publicCloud = CommunicationCloudEnvironment.PUBLIC;
CommunicationCloudEnvironment govCloud = CommunicationCloudEnvironment.GCCH;
CommunicationCloudEnvironment dodCloud = CommunicationCloudEnvironment.DOD;

// Set on Teams identifier
MicrosoftTeamsUserIdentifier teamsUser = new MicrosoftTeamsUserIdentifier("<user-id>")
    .setCloudEnvironment(CommunicationCloudEnvironment.GCCH);

Environment Variables

bash
AZURE_COMMUNICATION_ENDPOINT=https://<resource>.communication.azure.com
AZURE_COMMUNICATION_USER_TOKEN=<user-access-token>

Best Practices

  1. Proactive Refresh - Always use setRefreshProactively(true) for long-lived clients
  2. Token Security - Never log or expose full tokens
  3. Close Credentials - Dispose of credentials when no longer needed
  4. Error Handling - Handle token refresh failures gracefully
  5. Identifier Types - Use specific identifier types, not raw strings

Common Usage Patterns

java
// Pattern: Create credential for Chat/Calling client
public ChatClient createChatClient(String token, String endpoint) {
    CommunicationTokenRefreshOptions refreshOptions = 
        new CommunicationTokenRefreshOptions(this::refreshToken)
            .setRefreshProactively(true)
            .setInitialToken(token);
    
    CommunicationTokenCredential credential = 
        new CommunicationTokenCredential(refreshOptions);
    
    return new ChatClientBuilder()
        .endpoint(endpoint)
        .credential(credential)
        .buildClient();
}

private String refreshToken() {
    // Call your token endpoint
    return tokenService.getNewToken();
}

Trigger Phrases

  • "ACS authentication", "communication token credential"
  • "user access token", "token refresh"
  • "CommunicationUserIdentifier", "PhoneNumberIdentifier"
  • "Azure Communication Services authentication"

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .github/plugins/azure-sdk-java/skills/azure-communication-common-java of microsoft/skills.

  • SKILL.md
  • references/examples.md

Open the folder on GitHubat commit 354361d

Used in 6 other repositories

We found 16 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 6 other GitHub owners. This page covers the copy in microsoft/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Azure Communication Common Java next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Azure Communication Common Java compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Azure Communication Common Java this skillmicrosoft/skills3.1k6 repos~2.4kAutomated safety check: PassMIT
Rsid SDKrealsenseai/RealSenseID122—~4.1kAutomated safety check: PassApache-2.0
Springboot Securityaffaan-m/ECC274k5 repos~2kAutomated safety check: PassMIT
Java ArchitectJeffallan/claude-skills12k—~1.5kAutomated safety check: PassMIT
Spring Boot EngineerJeffallan/claude-skills12k—~1.9kAutomated safety check: PassMIT
Springboot Init Skilljiushiwon/wg-skills110—~2.2kAutomated safety check: NotesApache-2.0

Similar skills

  • Rsid SDK

    realsenseai/RealSenseID

    RealSenseID face authentication SDK reference. An agent skill from realsenseai/RealSenseID.

    122 GitHub stars~4.1k tokensUpdated 21 days ago
    Backend & APIsAuto-check passed
  • Spring Security best practices for authn/authz, validation, CSRF, secrets, headers, rate limiting, and dependency security in Java Spring Boot services.

    274k GitHub starsUsed in 5 repos~2k tokens
    Backend & APIsAuto-check passed
  • Java Architect

    Jeffallan/claude-skills

    Builds Spring Boot 3.x services on Java 21 with domain-driven design, WebFlux, JPA tuning and Spring Security using OAuth2 and JWT, verified by Maven or Gradle builds.

    12k GitHub stars~1.5k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Spring Boot Engineer

    Jeffallan/claude-skills

    Builds Spring Boot 3.x services with REST controllers, Spring Data JPA, Spring Security 6, WebFlux and Spring Cloud, verified by tests and Actuator health checks.

    12k GitHub stars~1.9k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Springboot Init Skill

    jiushiwon/wg-skills

    Spring Boot 项目一键初始化技能。面向零基础小白,提供环境探测、自动安装、完整 Web 骨架生成、SSE 流式框架、JWT 鉴权、统一响应封装、文件上传接口、一键启动/重启脚本、Swagger 文档,内置 MySQL(默认)/ PostgreSQL / MongoDB 数据库选择。用户只需说"帮我搭一个 Spring Boot…

    110 GitHub stars~2.2k tokensUpdated 3 days ago
    Backend & APIsAuto-check: notes
  • Project Generator

    LeoYeAI/openclaw-master-skills

    Automatically transform requirement documents or natural language descriptions into complete full-stack projects (Java backend + Vue frontend) with MANDATORY interactive tech stack selection.

    2.2k GitHub stars~4.5k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed

More from microsoft/skills

All 150 skills in this repo
  • Official

    Reference for building on Microsoft Foundry with the azure-ai-projects Python SDK: project clients, versioned agents, evaluations, connections, datasets and indexes.

    3.1k GitHub starsUsed in 6 repos~2.8k tokens
    Auto-check passed
  • Official

    Python guidance for the Azure AI Search SDK covering vector, hybrid and semantic search, index management and indexers, with Entra ID authentication preferred over keys.

    3.1k GitHub starsUsed in 6 repos~4.4k tokens
    Auto-check passed
  • Official

    Covers producer, consumer, and checkpoint-store setup for Azure Event Hubs streaming in Python, with Entra ID auth and partition targeting.

    3.1k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Pydantic Models Py

    microsoft/skills

    Official

    Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants.

    3.1k GitHub starsUsed in 6 repos~496 tokens
    Auto-check passed
  • Official

    Builds podcast-style audio narration from text with Azure OpenAI's GPT Realtime Mini over WebSocket, from a Python FastAPI backend to a React player.

    3.1k GitHub starsUsed in 1 repo~947 tokens
    Auto-check passed
  • Frontend UI Dark TS

    microsoft/skills

    Official

    Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations.

    3.1k GitHub starsUsed in 5 repos~3.6k tokens
    Auto-check passed

Categories

Questions about Azure Communication Common Java

What does Azure Communication Common Java do?

Azure Communication Services common utilities for Java. An agent skill from microsoft/skills. Azure Communication Common Java is an agent skill from microsoft/skills, published by the product's own GitHub organization. Azure Communication Services common utilities for Java.

When should I use Azure Communication Common Java?

Azure Communication Common Java fits situations like: working with CommunicationTokenCredential; user identifiers; shared authentication across ACS services.

How do I install Azure Communication Common Java in Claude Code?

Run `npx skills add microsoft/skills --skill azure-communication-common-java -a claude-code`. Or copy the skill folder (.github/plugins/azure-sdk-java/skills/azure-communication-common-java in microsoft/skills) into .claude/skills/azure-communication-common-java in your project. Claude Code loads it when a task matches its description.

How do I install Azure Communication Common Java in Codex?

Run `npx skills add microsoft/skills --skill azure-communication-common-java -a codex`. Or copy the skill folder (.github/plugins/azure-sdk-java/skills/azure-communication-common-java in microsoft/skills) into .agents/skills/azure-communication-common-java in your project. Codex loads it when a task matches its description.

Can I use Azure Communication Common Java in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/skills --skill azure-communication-common-java -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/azure-communication-common-java, .gemini/skills/azure-communication-common-java, .github/skills/azure-communication-common-java and .opencode/skills/azure-communication-common-java in your project.

What does Azure Communication Common Java need to run?

Going by SKILL.md and its folder, Azure Communication Common Java needs credentials named AZURE_COMMUNICATION_USER_TOKEN. Our summary lists: A credential in AZURE_COMMUNICATION_USER_TOKEN.

Does Azure Communication Common Java access the network?

SKILL.md names 1 domain. In commands or code: auth.msft.communication.azure.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Azure Communication Common Java safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Azure Communication Common Java use?

Azure Communication Common Java is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Azure Communication Common Java use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.7k tokens, read only when the agent opens those files.

What are the alternatives to Azure Communication Common Java?

Skills that share tags, products or a category with Azure Communication Common Java: Rsid SDK (realsenseai/RealSenseID, 122 stars), Springboot Security (affaan-m/ECC, 274k stars), Java Architect (Jeffallan/claude-skills, 12k stars) and Spring Boot Engineer (Jeffallan/claude-skills, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Azure Communication Common Java?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/skills, which has 3,086 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on October 6, 2026.

Source: microsoft/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.