In Azure Active Directory, I have an App Registrat...
# dotnet
a
In Azure Active Directory, I have an App Registration. I want to add a permission using Pulumi. I can do it in the Azure Portal manually, as shown in the attached image. Can someone point me to an example of how to do this with Pulumi (C#), please?
t
Have a look at
Pulumi.AzureAD
package. Maybe this example might be useful https://github.com/pulumi/kubernetes-guides/blob/master/azure/01-identity/index.ts (it’s TypeScript but you can translate almost 1-on-1)
c
To extend what Mikhail said above, you can find the Permission GUID string values for Microsoft services from this (link below) document, that shows you how you can get them from AzurePS. https://docs.microsoft.com/en-us/azure/active-directory/azuread-dev/v1-permissions-consent
b
@clever-sunset-76585 should these be constants in our package??
c
@broad-dog-22463 That would help create permission objects easily for sure.
👍 1
b
Ok I’ll open an issue - thanks!
👍 1
a
Thanks for your help with this, all. I managed to get this working, although it took me a little while. The reason for this was that I already had a reference to Pulumi.Azure.AD and was using ApplicationArgs from this namespace. I couldn't understand why I could see the Name, Homepage and ReplyUrls using IntelliSense, yet I couldn't see RequiredResourceAccesses. It took me some time to discover that I needed to install the Pulumi.AzureAD nuget package. It's all good now, though. It did make me wonder if one of these classes is deprecated. If so, an Obsolete attribute mentioning the Pulumi.AzureAD nuget package would have helped me here. Again, thanks for your help and keep up the excellent work. Pulumi is an outstanding product and will be at the centre of our deployment story for new projects.
t
Yeah, that’s unfortunate. FWIW, the 2.0 version of the Pulumi.Azure package is coming very soon, and the AD namespace was removed from it.
👍 1
We are also working on
Obsolete
attributes on deprecated classes as we speak.
👍 1