https://pulumi.com logo
#dotnet
Title
# dotnet
a

ambitious-apartment-7017

03/07/2020, 2:29 PM
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

tall-librarian-49374

03/07/2020, 3:02 PM
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

clever-sunset-76585

03/07/2020, 8:09 PM
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

broad-dog-22463

03/07/2020, 9:15 PM
@clever-sunset-76585 should these be constants in our package??
c

clever-sunset-76585

03/07/2020, 11:31 PM
@broad-dog-22463 That would help create permission objects easily for sure.
👍 1
b

broad-dog-22463

03/08/2020, 12:08 PM
Ok I’ll open an issue - thanks!
👍 1
a

ambitious-apartment-7017

03/09/2020, 8:44 AM
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

tall-librarian-49374

03/09/2020, 8:49 AM
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
2 Views