title: Valid parameters for New-AzureADGroupAppRoleAssignment PowerShell
body: <p>I am trying to assign a <strong>group</strong> to the Azure application from PowerShell. For that, I activated the Azure AD Premium P2 license free trial recently as it is a prerequisite.</p>
  <p><strong>Command</strong>:</p>
  <pre><code>New-AzureADGroupAppRoleAssignment -ObjectId groupid -Id appid -PrincipalId groupid -ResourceId appid
  </code></pre>
  <p><strong>Error:</strong></p>
  <pre><code>New-AzureADUserAppRoleAssignment : Error occurred while executing NewUserAppRoleAssignment 
  Code: Request_ResourceNotFound
  Message: Resource 'xxxxx-xxx-xxxx-xxxx' does not exist or one of its queried reference-property objects are not present.
  RequestId: 85bd8a07-47b8-42d1-9ea8-4966b309350b
  DateTimeStamp: Thu, 11 Aug 2022 07:46:33 GMT
  HttpStatusCode: NotFound
  HttpStatusDescription: Not Found
  HttpResponseStatus: Completed
  At line:1 char:1
  + New-AzureADUserAppRoleAssignment -ObjectId  ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (:) [New-AzureADUserAppRoleAssignment], ApiException
      + FullyQualifiedErrorId : Microsoft.Open.AzureAD16.Client.ApiException,Microsoft.Open.AzureAD16.PowerShell.NewUserAppRoleAssignment
  </code></pre>
  <p>I'm guessing something is wrong with my parameters but the below document does not specify any working example for reference. It just mentioned value to be string:</p>
  <p><a href="https://docs.microsoft.com/en-us/powershell/module/azuread/new-azureadgroupapproleassignment?view=azureadps-2.0" rel="nofollow noreferrer">New-AzureADGroupAppRoleAssignment | Microsoft Docs</a></p>
  <p>I tried with both appid and objectid of enterprise and normal app. But still getting the same error:( Anyone tried this and made it work?</p>