This pull request introduces the GetResourceIDFromCloudsConfig function, allowing the endpoint_active_directory_resource_id to be retrieved from the clouds.config file (~/.azure/clouds.config). If present, this value is used to set the TokenAudience in the Azure environment during client initialization.
Motivation:
This resolves issues where applications in Entra ID (Azure AD) may not always have the correct Application ID URI configured. By reading the TokenAudience from clouds.config, the provider can dynamically adapt to such configurations without requiring manual intervention.
The implementation is backward-compatible, defaulting to existing behavior if the file or key is not available.
This pull request introduces the GetResourceIDFromCloudsConfig function, allowing the endpoint_active_directory_resource_id to be retrieved from the clouds.config file (~/.azure/clouds.config). If present, this value is used to set the TokenAudience in the Azure environment during client initialization.
Motivation: This resolves issues where applications in Entra ID (Azure AD) may not always have the correct Application ID URI configured. By reading the TokenAudience from clouds.config, the provider can dynamically adapt to such configurations without requiring manual intervention.
The implementation is backward-compatible, defaulting to existing behavior if the file or key is not available.