は、私が働いているMicrosoft graph sample appOffice 365のAPIはMicrosoftグラフ認証が
そして標準のログインからサンプルアプリを登録できなかったが、私はこのコードを使用してsimplierそれを作るしようとすると:私は次のエラーを取得する
var authContext = new AuthenticationContext(Settings.AzureADAuthority);
var token = authContext.AcquireToken(Settings.O365UnifiedAPIResource, new ClientCredential(Settings.ClientId, Settings.ClientSecret)).AccessToken;
を:Application with identifier '[ClientId here]' was not found in the directory microsoft.com
Setting.O365UnifiedAPIResource = @"https://graph.microsoft.com/";
Settings.AzureADAuthority = @"https://login.microsoftonline.com/common";
誰でも問題が分かるでしょうか?
あなたSettings.ClientIdをチェックし、あなたがあなたのサンプルアプリケーションを登録するときに取得クライアントIDの文字列を使用して、プロジェクト内の[ここClientIdを]を置き換えたのですか? @Aleksa。 – Jackie
私は前と同じ問題に会った。 AzureADAuthorityを "https://login.microsoftonline.com/YourTenantName"として変更することができます。その後、コードが動作します。 –
@NanYuありがとう:) – Aleksa