I'm running pulumi inside an azure devops pipeline. I need to find the the pipeline Service Principal ObjectId
var clientConfig = Output.Create(Pulumi.Azure.Core.Invokes.GetClientConfig());
var clientId = clientConfig.Apply(c => c.ObjectId);
This gives me the application ObjectId as an Output, now from here how can I find my Service Principal ObjectId.
I can't do that because clientId is Output<string>
and ObjectId is expecting string
var adApp = Output.Create(Pulumi.AzureAD.Invokes.GetApplication(new GetApplicationArgs { ObjectId = clientId}));
var adSp = Output.Create(Pulumi.AzureAD.Invokes.GetServicePrincipal(new GetServicePrincipalArgs { ApplicationId = adApp.App(a => a.ApplicationId)});