Reputation: 51
I am trying to create a group calendar using C# code and GraphServiceClient
. I already got a GraphServiceClient
object. But as soon as I call the below code, nothing happens. There is no response of the call. It just calls and forgets.
Group group = await graphClient.Groups.Request()
//.WithUserAccount(ClaimsPrincipal.Current.ToGraphUserAccount())
.AddAsync(new Group
{
GroupTypes = new List<string> { "Unified" },
DisplayName = "Test",
Description = "Test",
MailNickname = "Test",
MailEnabled = false,
SecurityEnabled = false
});
Questions I have:
Is there any way to validate the GraphServiceClient
object value?
Is there any log service which can help me understand why graphClient.Groups.Request()
calls are not responding?
Upvotes: 1
Views: 1558
Reputation: 5549
Based on my test, it just works.
When debug it, I can get the group object:
By analyzing with Fiddler, I can double check that the group creating request get a success.
So:
I do not think that you need to validate it. If the GraphServiceClient object is invalid, you will get an error exception.
Based on my test, it just works. You may debug it or use Fiddler to capture the traffic to see if any request was made.
Upvotes: 1