<@U058TQ328V7> hello, I checked in Pulumi IA, and ...
# azure
c
@proud-noon-87466 hello, I checked in Pulumi IA, and I got code from below :
Copy code
import pulumi
from pulumi_azure_native import core

current = core.get_subscription_invoker()

pulumi.export("subscription_id", current.subscription_id)
p
The AI gets it wrong every time. I did figure out the right way to do this
Copy code
from pulumi_azure_native import authorization

# Retrieve the Azure subscription ID
subscription_id = authorization.get_client_config().subscription_id

# Export the subscription ID
pulumi.export("subscription_id",  subscription_id)
m
Be careful, in Typescript package the subId comes from the environment variables. When we changed the login mode to OIDC, the variable does not need to exist anymore and the authorization package fails to retrieve the subId.