Skip to content

Identities with custom ID not atomic on the service #38531

@mderriey

Description

@mderriey
  • Package Name: @azure/communication-identity
  • Package Version: 1.4.0-beta.1
  • Operating system:
  • nodejs
    • version: 24.14.1
  • browser
    • name/version:
  • typescript
    • version: 6.0.3
  • Is the bug related to documentation in

Describe the bug

When using custom IDs, the service isn't atomic, such that multiple close-enough calls to createUser({ customId }) will produce two separate identities, and subsequent calls will fail with a MultipleIdentitiesForCustomId error.

To Reproduce
Steps to reproduce the behavior:

const client = new CommunicationIdentityClient(endpoint, azureCredential)
const customId = randomUUID()

await Promise.all(new Array(10).fill(null).map(async () => {
  const { communicationUserId } = await client.createUser({ customId })
  console.log('Identity ID', communicationUserId)
}))

Expected behavior

All 10 promises return and log the same identity ID.

Screenshots

N/A.

Additional context

I understand this is not a client library issue, but I figured it's probably the best way to get the engineering team involved. Thanks for your understanding. Please point me in the right direction otherwise.

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Communication - Identitycustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions