Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[BUG] Get-PnPUser -WithRightsAssignedDetailed - The property or field 'Email' has not been initialized

オープン
#5,477 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp, powershell
領域
cli

調査の方向性

Reproduce the issue with Get-PnPUser -WithRightsAssignedDetailed using the connection and module versions described. Start by reading src/Commands/Base/PnPConnectedCmdlet.cs and PnPSharePointCmdlet.cs from the reported stack trace, then trace the Get-PnPUser path. Done means the command returns valid users without failing when an entry lacks an initialized Email property.

索引モデルが issue の本文から書いたものです。

説明

bug
Issue
Expected behavior

List of all users with rights assigned

Actual behavior

Error message:
Get-PnPUser: The property or field 'Email' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.

Steps to reproduce behavior

$global:con = Connect-PnPOnline -Url $BaseUrl -CertificateBase64Encoded $global:base64 -CertificatePassword $global:certpass -ClientId $global:clientId -Tenant $aadDomain -TenantAdminUrl $spTenantAdminUrl -ReturnConnection -ErrorAction Stop
$users = Get-PnPUser -WithRightsAssignedDetailed -Connection $con

Get-PnPException:
Message : The property or field 'Email' has not been initialized. It has not been requested or the request has not been executed. It may need to be
explicitly requested.
Stacktrace : at PnP.PowerShell.Commands.Base.PnPConnectedCmdlet.ProcessRecord() in D:\a\powershell\powershell\src\Commands\Base\PnPConnectedCmdlet.cs:line
104
at PnP.PowerShell.Commands.PnPSharePointCmdlet.ProcessRecord() in D:\a\powershell\powershell\src\Commands\Base\PnPSharePointCmdlet.cs:line 165
at System.Management.Automation.CommandProcessor.ProcessRecord()
ScriptLineNumber : 1

This is likely due to data from outdated objects, as the error does not occur on all pages. However, in this case, the module should continue to operate stably and simply ignore the faulty entries instead of failing to provide any data.

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

PnP.Powershell 3.4.1 and 2.12.0

Which operating system/environment are you running PnP PowerShell on?
  • [ X] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
主要言語
C#
スター
904
フォーク
407
平均マージ
2日 9時間
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pnp/powershell のほかの issue

pnp/powershell の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。