[BUG] Grant-PnPAzureADAppSitePermission throws "invalidRequest" error. #3040
-
Hi All I'm running PowerShell 7.3.3 and PnP PowerShell 2.1.1. I've run Grant-PnPAzureADAppSitePermission many times in the past using an older version of PnP Powershell, but now with the 2.1.1 version I get the following error: Grant-PnPAzureADAppSitePermission: {"error":{"code":"invalidRequest","message":"Invalid request","innerError":{"date":"2023-04-19T21:22:33","request-id":"[GUID]","client-request-id":"[GUID]"}}} here is the command I ran (with fake id and and display name): Grant-PnPAzureADAppSitePermission -AppId 0000000-0000-00000000-000000000000 -DisplayName "tst-app-reg" -Permissions Write To confirm that the app reg itself was not the problem I tried the command with a different app registration that I successfully configured with Grant-PnPAzureADAppSitePermission in the past and encountered the same error. Also, I'm running this on a Windows 11 machine. Other commands such as Connect-PnPOnline and Get-PnPAzureADAppSitePermission work fine. Let me know if you require more information Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'm running into the same issue. I'm pretty sure the cmdlet worked fine yesterday, but now it does not work. My script has not changed.
Is there a way to see more information about the failed request? I can still add permissions using the |
Beta Was this translation helpful? Give feedback.
Hi, there was a regression in
2.1.1
, we fixed that and it is available in the latest nightly builds.You can download the nightly version by doing this
Install-module PnP.PowerShell -AllowPrerelease
or specifying the exact version like2.1.25-nightly