3

をグループのメンバーを照会する場合:例外(正規のユーザー以外の)一員として接している<a href="https://www.nuget.org/packages/Microsoft.Graph" rel="nofollow">Microsoft.Graph Client Library</a>を使用してグループのメンバーをロードしようとすると、次の例外がスローされMicrosoft.Graphクライアントで

 
The value 'Microsoft.Graph.Contact' is not of type 'Microsoft.Graph.DirectoryObject' and cannot be used in this generic collection. Parameter name: value 

at Newtonsoft.Json.Utilities.CollectionWrapper\`1.VerifyValueType(Object value) 
     at Newtonsoft.Json.Utilities.CollectionWrapper\`1.System.Collections.IList.Add(Object value) 
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) 
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Populate(JsonReader reader, Object target) 
     at Newtonsoft.Json.Serialization.JsonSerializerProxy.PopulateInternal(JsonReader reader, Object target) 
     at Newtonsoft.Json.Converters.CustomCreationConverter\`1.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) 
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) 
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) 
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) 
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) 
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) 
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) 
     at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) 
     at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) 
     at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) 
     at Microsoft.Graph.Serializer.DeserializeObject[T](String inputString) 
     at Microsoft.Graph.BaseRequest.d__27`1.MoveNext() 
    --- End of stack trace from previous location where exception was thrown --- 
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
     at Microsoft.Graph.GroupMembersCollectionWithReferencesRequest.d__2.MoveNext() 

オンラインgraph-explorerを使用する場合は、要求がうまく接触を返す例外

var grpMembers = client.Groups["Id of a group with a contact as member"].Members.Request().GetAsync().Result; 

をスローするコード。私は、連絡先はMicrosoft.Graphのv1.0ではサポートされていないことを理解しています。フィルタ句を使用して、返されたメンバをサポートされている型に限定する方法はありますか?

答えて

3

ご報告いただきありがとうございます。私はこれのためのバグを作成し、我々は見てみましょう。レスポンスに必要なオブジェクトタイプのみが含まれるように、キャストを許可するバックログ項目もあります。私はこれもクライアントライブラリでサポートする必要があります。しかし、この場合、v1.0は組織の連絡先についても「知っている」べきではないので、これはサービスのバグかもしれないように見えます。そして、一見すると、個人的な連絡先にマッピングされているように見えます。

ご連絡を差し上げます。再度、報告していただきありがとうございます。

関連する問題