powershell icon indicating copy to clipboard operation
powershell copied to clipboard

[BUG] Add-PnPEntraIDServicePrincipalAppRole no response

Open eddison-shyi opened this issue 2 years ago • 0 comments

Reporting an Issue or Missing Feature

Get-PnPAzureADServicePrincipalAssignedAppRole & Add-PnPEntraIDServicePrincipalAppRole no response (Same with Azure CLI & Windows PowerShell 7), and after 30min it shows verification code expired error. (I've logged in successfully before calling these command) image

Expected behavior

Return the result immediately

Actual behavior

Idle until verification code expired

Steps to reproduce behavior

# Make sure ClientId app with proper permission for next command, e.g. AppRoleAssignment.ReadWrite.All and Application.Read.All
Connect-PnPOnline -Url ...  -DeviceLogin -ClientId ... -Tenant ...

# After login success
Add-PnPEntraIDServicePrincipalAppRole -Principal $AppID -AppRole "Sites.FullControl.All" -BuiltInType SharePoint

What is the version of the Cmdlet module you are running?

(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable) 2.12.0 on powershell 7.4.5 (windows)

Which operating system/environment are you running PnP PowerShell on?

  • [X] Windows
  • [ ] Linux
  • [ ] MacOS
  • [X] Azure Cloud Shell
  • [ ] Azure Functions
  • [ ] Other : please specify

eddison-shyi avatar Sep 19 '24 12:09 eddison-shyi