I'm using New-AzureADApplication -DisplayName MyApp -PasswordCredentials $PasswordCreds
(Password creds are defined elsewhere), which successfully creates the app registration (not enterprise app) alongside passkey without issue.
Where I'm failing is that I also have 5 graph application based permissions I want to add to this app including User.Read.All
I've tried to follow several answers on StackOverflow and read countless blogs, but, I'm simply failing at this. Some guides/answers seem to be out of date or when I run some examples, I'm getting about 6-8 different GUIDs for User.Read.All, and other answers just include the permission that the question answer was asking without explaining why/how.
I don't want an answer for User.Read.All, I really want to learn and understand how I can ultimately provide '-RequiredResourceAccess` the correct parameters when all I know is the permission name as above.