
Hi @Stefan Stanescu
First go to the manifest
of the application, find the signInAudience
attribute, change the attribute value to: AzureADandPersonalMicrosoftAccount
and save it.
Next use the graph PHP SDK to access your personal account email, please note that you must change /{tenant id}
to /common
to allow your personal account to log in.
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestConfiguration = new MessagesRequestBuilderGetRequestConfiguration();
$queryParameters = MessagesRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->select = ["sender","subject"];
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->me()->messages()->get($requestConfiguration);
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.