Skip to content

Installation Id in AzureRmContextSettings.json cannot keep the same with AZ CLI under specific situations #26563

Open
@NoriZC

Description

@NoriZC

Description

Background

After Installing Azure PowerShell, during the first time importing Az.Accounts, we will generate a file called AzureRmContextSettings.json.

For the InstallationId session in this file, we follow the rules:

  • If detected azconfig.json generated by AzCLI Installation id, reuse it.
  • If not detected, randomly generate a new guid.

By doing so, we can identify the Machines calling AzCLI/ AzPS command by the installation Id.

Issue

But we have some troubles while trying reusing this id. The Installation Id cannot keep the same with AZ CLI under situations when:

  • Under case-sensitive systems, like Lunix/ MacOS.

  • User defined a AZURE_CONFIG_DIR while installing AzCLI (*).

    (*) How AzCLI generate an Installation Id:

    • It first checks if the environment variable AZURE_CONFIG_DIR is set.
    • If AZURE_CONFIG_DIR is not set, it defaults to ~/.azure/.

Issue script & Debug output

N/A

Environment data

N/A

Module versions

N/A

Error output

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Azure PS TeamTrackingWe will track status and follow internallyfeature-requestThis issue requires a new behavior in the product in order be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions