Run one of these commands to set the email address and Graph Message ID:
If you want the output to include headers, body, and attachments, run this command:
POWERSHELL
./mgc users messages get `
--user-id <user_email> `
--message-id '<message_id>/$value'
Where:
user_email is the user email address.
message_id is the Graph Message ID. The Graph Message ID includes an equals ( =) character at the end. Surround 'message_id/$value' with single quotes. For example, 'abcd1234=/$value'.
If you do not want the output to include headers, body, and attachments, run this command:
POWERSHELL
./mgc users messages get `
--user-id <user_email> `
--message-id <message_id>
Where:
user_email is the user email address.
message_id is the Graph Message ID. The Graph Message ID includes an equals ( =) character at the end.
Retrieve the message using Windows Command Prompt
Open Windows Command Prompt.
Run this command to set the environment variable for AZURE_CLIENT_SECRET:
BASH
set AZURE_CLIENT_SECRET=<secret_id>
Where:
secret_id is your Client Secret value.
Run this command to sign in to the Azure application and specify the directory (tenant) and application (client) IDs:
Run one of these commands to set the email address and Graph Message ID.
If you want the output to include headers, body, and attachments, run this command:
BASH
./mgc users messages get \
--user-id '<user_email>' \
--message-id '<message_id>/$value'
Where:
user_email is the user email address.
message_id is the Graph Message ID. The Graph Message ID includes an equals ( =) character at the end. Surround 'message_id/$value' with single quotes. For example, 'abcd1234=/$value'.
If you do not want the output to include headers, body, and attachments, run this command:
BASH
./mgc users messages get \
--user-id '<user_email>' \
--message-id '<message_id>'
Where:
user_email is the user email address.
message_id is the Graph Message ID. The Graph Message ID includes an equals ( =) character at the end.
Managed Security Awareness Portal (MA Portal)PortalsManaged Security Awareness (MA)User GuidePublic