microsoftgraph / msgraph-sdk-php

Microsoft Graph Library for PHP.
Other
551 stars 141 forks source link

Fatal error: Uncaught Error: Class "Microsoft\Graph\Generated\BaseGraphClient" not found in vendor\microsoft\microsoft-graph\src\GraphServiceClient.php #1544

Open developer-itsapp2you opened 3 weeks ago

developer-itsapp2you commented 3 weeks ago
use Microsoft\Kiota\Authentication\Oauth\ClientCredentialContext;
use Microsoft\Graph\Core\Authentication\GraphPhpLeagueAuthenticationProvider;
use Microsoft\Graph\GraphServiceClient;

$tokenRequestContext = new ClientCredentialContext(
    $ob_config->tenant,
    $ob_config->client_id,
    $ob_config->client_secret
);

$scopes = ['User.Read', 'Mail.ReadWrite'];
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
print_r($tokenRequestContext);
{
    "config": {
        "allow-plugins": {
            "php-http/discovery": false
        }
    },
    "require": {
        "microsoft/microsoft-graph": "^2.11",
        "microsoft/microsoft-graph-core": "^2.1"
    }
}