I am working with the Google Vault API in C# and need to retrieve the email address of the user who created a Matter (i.e., the owner). Specifically, I want the email address to be visible when:
Listing all Matters
Accessing the Hold or Exports tab associated with the Matter
What I’ve tried: I'm currently retrieving Matters like this:
var listRequest = vaultService.Matters.List();
listRequest.View = MattersResource.ListRequest.ViewEnum.FULL;
var response = listRequest.Execute();
foreach (var matter in response.Matters)
{
Console.WriteLine($"Matter ID: {matter.MatterId}, Owner: {matter.Owner}");
}
The matter.Owner field returns only an account ID, which looks like a unique identifier (e.g., 111111111111111111111). It does not return the email address of the owner.
I also tried:
var getRequest = vaultService.Matters.Get(matterId);
getRequest.View = MattersResource.GetRequest.ViewEnum.FULL;
var matter = getRequest.Execute();
Still, the matter.Owner is just an account ID.
What I have available: I have enabled the Admin SDK Directory API with the following scope:
https://www.googleapis.com/auth/admin.directory.user.readonly
What I want: I want to get the email address of the Matter owner from either the Matter list or from a specific Matter (preferably both).
Also, when dealing with Holds or Exports, I want to show who initiated the export or hold action—ideally via their email address.
Questions: Is there a way in Google Vault API to directly get the email address of the Matter owner?
If not, can I use the Admin SDK Directory API to map the matter.Owner account ID to an email address?
Does the matter.Owner field represent a user ID that can be used with the Directory API?
Any help or example using C# is much appreciated.