M365Documentation icon indicating copy to clipboard operation
M365Documentation copied to clipboard

New-M365DocAppRegistration fails with BadRequest

Open Apoc70 opened this issue 4 years ago • 0 comments

When I try to add a new App registration, the code fails as follows. The module version is 3.1.2

PS C:\SCRIPTS> $p = New-M365DocAppRegistration Set-AzureADApplication : Error occurred while executing SetApplication Code: Request_BadRequest Message: Property requiredResourceAccess.resourceAccess is invalid. RequestId: 450900c3-5e76-480d-88aa-ef7a53a3aa8d DateTimeStamp: Thu, 28 Oct 2021 09:36:36 GMT Details: PropertyName - requiredResourceAccess.resourceAccess, PropertyErrorCode - GenericError HttpStatusCode: BadRequest HttpStatusDescription: Bad Request HttpResponseStatus: Completed In C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.1.2\Internal\Helper\Set-AzureADAppPermission.ps1:35 Zeichen:9 Set-AzureADApplication -ObjectId $childApp.ObjectId -Required ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CategoryInfo : NotSpecified: (:) [Set-AzureADApplication], ApiException FullyQualifiedErrorId : Microsoft.Open.AzureAD16.Client.ApiException,Microsoft.Open.AzureAD16.PowerShell.SetAppl ication

Apoc70 avatar Oct 28 '21 09:10 Apoc70