[BUG] Runbook automation unable to continue after creating TeamsSite using new-pnpsite
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Start by locating the New-PnPSite implementation and its tests, then trace how the -Wait option behaves when run under Azure Automation with a managed-identity connection. The report says the site and group are created but execution never resumes, even with -Wait omitted; reproduce that behavior and verify the runbook continues after the command returns.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Reporting an Issue or Missing Feature
I have a Azure Automation resource with permissions set to Sites.FullControl.All, Group.Create Group.ReadWrite.All, the runbook connects through Powershell to the admin site, and then the new-pnpsite is called:
New-PnPSite -Type TeamSite -Title $SiteName -Alias $groupAlias -SiteAlias $groupAlias -TimeZone 4 -Lcid 1033 -Owners $owners -Connection $adminConnection -Wait -ErrorAction Stop -Verbose
The script now just stops executing and remains in the 'running' state. I have to stop the script manually. I have attached verbose logging.
In the background the Teamssite is actually created, the Teams group gets created and I am able to connect-pnpsite with another runbook. setting the Wait to $false and polling the site being created doesn't help either, the script just remains in a indefinite waiting state after calling New-PnPSite.
Expected behavior
I expected the script to continue running, now the logging just cuts off at New-PnPSite and nothing else is logged.
Actual behavior
The site is created, but the script is stuck.
Steps to reproduce behavior
Create Azure Automation account, provide Sites.FullControl.All and Group.ReadWrite.All permissions.
$adminConnection = Connect-PnPOnline -Url $spoAdminSiteUrl -ManagedIdentity -ReturnConnection -ErrorAction Stop
New-PnPSite -Type TeamSite -Title $SiteName -Alias $groupAlias -SiteAlias $groupAlias -TimeZone 4 -Lcid 1033 -Owners $owners -Connection $adminConnection -Wait -ErrorAction Stop -Verbose
Tail of Verbose logging:
10/5/2026, 15:52:54 - Verbose: Cmdlet execution done for $adminConnection = Connect-PnPOnline -Url $spoAdminSiteUrl -ManagedIdentity -ReturnConnection -ErrorAction Stop
10/5/2026, 15:52:54 - Verbose: Cmdlet execution started for $existingGroup = Get-PnPMicrosoft365Group -Identity $groupAlias -Connection $adminConnection -ErrorAction SilentlyContinue
10/5/2026, 15:52:55 - Verbose: Cmdlet execution done for $existingGroup = Get-PnPMicrosoft365Group -Identity $groupAlias -Connection $adminConnection -ErrorAction SilentlyContinue
10/5/2026, 15:52:55 - Verbose: Cmdlet execution started for $existingSite = Get-PnPTenantSite -Identity $spoSiteUrl -Connection $adminConnection -ErrorAction SilentlyContinue
10/5/2026, 15:52:55 - Verbose: Already connect to the SharePoint Online Admin Center at 'https://REDACTED-admin.sharepoint.com'
10/5/2026, 15:52:56 - Verbose: Cmdlet execution done for $existingSite = Get-PnPTenantSite -Identity $spoSiteUrl -Connection $adminConnection -ErrorAction SilentlyContinue
10/5/2026, 15:52:56 - Output: Creating group-connected SharePoint site 'https://REDACTED.sharepoint.com/sites/prj-2026-test-stefan-200'.
10/5/2026, 15:52:56 - Verbose: Cmdlet execution started for New-PnPSite -Type TeamSite -Title $SiteName -Alias $groupAlias -SiteAlias $groupAlias -TimeZone 4 -Lcid 1033 -Owners $owners -Connection $adminConnection -Wait -ErrorAction Stop -Verbose
There is no further logging.
What is the version of the Cmdlet module you are running?
3.4.1
Which operating system/environment are you running PnP PowerShell on?
- Windows
- Linux
- MacOS
- Azure Cloud Shell
- Azure Functions
- Other : Azure Automation Powershell Runbook
- Lenguaje dominante
- C#
- Estrellas
- 912
- Forks
- 407
- Merge medio
- 23 h 19 min
- PR fusionados (30 d)
- 9
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pnp/powershell
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pnp/powershell#5506 ·
Los mantenedores suelen responder en 1 día
-
[FEATURE] Get-PnPUser -CurrentAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pnp/powershell#5476 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
pnp/powershell#5492 · 6 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
pnp/powershell#5477 · 11 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
pnp/powershell#5466 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de pnp/powershell
Issues similares
-
bug emitter:client:csharp
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/typespec#12572 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area-networking
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/aspnetcore#70545 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día