1

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.

3
  • Upon experimenting, you can use the Directory API to match the Accoutn ID from matters.get to a user and ultimately access that user's email address Commented Jul 9 at 11:28
  • You can supply the Account id that you got in method (user.get)[developers.google.com/workspace/admin/directory/reference/rest/… Commented Jul 9 at 11:35
  • Please limit your post to a specific concern only Commented Jul 9 at 11:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.