Vasyl Zvarydchuk
Vasyl Zvarydchuk

Reputation: 3839

Is Azure AAD application ID unique in whole Azure?

I know that AAD application ID is unique in one directory (tenant). It is a guid and apparently should be unique in whole world but collisions may be. The question is: does Azure while generation AAD application ID validate whether it is unique across all others directories or not?

Upvotes: 2

Views: 1680

Answers (1)

Md Farid Uddin Kiron
Md Farid Uddin Kiron

Reputation: 22419

If you look at the official document for application property you would know application id is

The unique identifier for the application that is assigned to an application by Azure AD. Not nullable. Read-only

How Azure Application Id Generated Uniquely:

Application Id (GUID) break down like this:

  1. 60 bits of timestamp,
  2. 48 bits of computer identifier,
  3. 14 bits of uniquifier, and
  4. six bits are fixed

Total of 128 bits. The goal of this algorithm is to use the combination of time and location (“space-time coordinates” for the relativity geeks out there) as the uniqueness key.

However, there’s a possibility that, for example, two GUIDs are generated in rapid succession from the same machine, so close to each other in time that the timestamp would be the same. That’s where the uniquifier comes in.

When time appears to have stood still (if two requests for a GUID are made in rapid succession) or gone backward (if the system clock is set to a new time earlier than what it was), the uniquifier is incremented so that GUIDs generated from the “second time it was five o’clock” don’t collide with those generated “the first time it was five o’clock”.

Once you see how it all works, it’s clear that you can’t just throw away part of the GUID since all the parts (well, except for the fixed parts) work together to establish the uniqueness. This is how all that works.

Note: Even sometimes network address also considered for GUID.

Upvotes: 4

Related Questions