https://pulumi.com logo
#general
Title
# general
t

tall-librarian-49374

05/23/2019, 2:33 PM
Hi!
pulumi.output(azure.core.getClientConfig({})).apply(c => servicePrincipalObjectId)
is empty when I run pulumi on my dev pc. Is there a way to get the current user ID? I need to use it as
objectId
for permissions.
r

rapid-eye-32575

05/23/2019, 3:01 PM
Just a hunch since I haven't used the Azure integration, but maybe you could set the principal credentials in the Pulumi config as described here: https://pulumi.io/quickstart/azure/setup.html And then access it via
new pulumi.Config("azure").require("clientId")
t

tall-librarian-49374

05/23/2019, 3:06 PM
I actually have a
clientId
now, but it's not the same thing (the Guid is different from whay I see in the portal)
c

colossal-room-15708

05/23/2019, 10:36 PM
@tall-librarian-49374 Azure is terrible when it comes to those GUIDs. This especially always gets me when programmatically allowing access for SPNs to Key Vault. There is a GUID one must use that isn't shown in the portal, but only via the API.
t

tall-librarian-49374

05/23/2019, 10:39 PM
I actually took a guid from the portal and it works. Object ID of my user in AD. I just can't find it in pulumi.
2 Views