1

Currently I am using Set-AzureADApplication (from AzureAD module) with -RequiredResourceAccess option to set the access to the resources I need, I am converting my script to Az module however the closest thing I found to Set-AzureADApplication was Update-AzADApplication however it does not have a -RequiredResourceAccess option.

Is there an Az module that let's me update the azure app in a similar way as Set-AzureADApplication?

Thank you!

Albert
  • 1,394
  • 1
  • 12
  • 16
  • 1
    This probably not the answer you want, but it can be done via az cli. There are several posts out there discussing the shortcoming of the Update-AzADApplication cmdlet. https://stackoverflow.com/questions/55385802/how-to-give-azure-ad-application-access-to-required-permissions-using-powershell – Scott Heath Oct 24 '19 at 01:02
  • You can also use the Microsoft API, but I'd stick with the az cli, it's easier. http://www.redbaronofazure.com/?p=7197 – Scott Heath Oct 24 '19 at 01:03
  • I agree on @ScottHeath comments.. good way to update the permission... – Mohit Verma Oct 24 '19 at 04:54
  • So why you want to use the `Az` module instead of `AzureAD` module? Cross-platform issue? You are using powershell core? – Joy Wang Oct 24 '19 at 08:42

1 Answers1

1

No, there is no such parameter like -RequiredResourceAccess for you to set the API permission in Az powershell module.

The one way is to use the azure cli az ad app permission add as mentioned in the comment.

Actually, if you want to fix the cross-platform issue with Powershell (I am not sure, but I don't think there will be a reason except this one), you could try the powershell core, it is cross-platform, refer to the link1 and link2 to install AzureAD.Standard.Preview module which supports AzureAD commands.

Joy Wang
  • 39,905
  • 3
  • 30
  • 54