すべてのユーザーのすべてのOffice Planner計画とタスクをMicrosoft Graph API経由で要求しようとしました。これはコンソールアプリケーションであり、Azure WebJobとして実行する必要があります。私はアクセストークンに苦労しています。 ユーザートークンを使用してhttps://graph.microsoft.com/beta/users/ {userid}/plansに403(禁止)を受け取ります。私はグラフAPIを要求することはできませんだけでアクセストークンアプリでMicrosoft Graph API/Office Plannerデータ用の正しいアクセストークン
AuthenticationContext authenticationContext = new AuthenticationContext($"https://login.microsoftonline.com/{TenantName}", false);
var authTask = authenticationContext.AcquireTokenAsync("https://graph.microsoft.com", _config.ClientIdUser, new UserPasswordCredential(_config.Username, _config.Password));
uthTask.Wait();
AuthenticationResult userAuthnResult = authTask.Result;
var token = userAuthnResult.AccessToken;
。私はどこかでapp + userトークンを使用する必要があるとおもいますが、どのようにトークンを要求できますか?