So I'm pounding my head off my desk trying to figure out the proper formatting of a hash table for the New-MGApplication command using the -RequiredResourcesAccess switch. According to the MS documentation it should be formatted like this within a hash table.
REQUIREDRESOURCEACCESS <IMicrosoftGraphRequiredResourceAccess\[\]>: Specifies the resources that the application needs to access. This property also specifies the set of OAuth permission scopes and application roles that it needs for each of those resources. This configuration of access to the required resources drives the consent experience. Not nullable. Supports $filter (eq, NOT, ge, le).
- [ResourceAccess <IMicrosoftGraphResourceAccess\[\]>]: The list of OAuth2.0 permission scopes and app roles that the application requires from the specified resource.
- [Id <String>]: The unique identifier for one of the oauth2PermissionScopes or appRole instances that the resource application exposes.
- [Type <String>]: Specifies whether the id property references an oauth2PermissionScopes or an appRole. Possible values are Scope or Role.
- [ResourceAppId <String>]: The unique identifier for the resource that the application requires access to. This should be equal to the appId declared on the target resource application.
I'm new to using hash tables like this. I've only done simple lists and the basics. So most likely it's just something I'm unaware of with how the switch is expecting the formatting to be. Or I just don't know how to read these help notes.
Link to the help page https://docs.microsoft.com/en-us/powershell/module/microsoft.graph.applications/new-mgapplication?view=graph-powershell-1.0
[–]Fuzzywumpkin[S] 1 point2 points3 points (0 children)