Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "Bernard"

Hi I think your response is for another ticket #12036 If not I don’t understand your response for MS graph connecting

Hi,

You need to go to after login like a tenant with OpenIdConnect

Hi I followed this example https://learn.microsoft.com/en-us/training/modules/msgraph-dotnet-core-show-user-emails/1-introduction

Hi,

Thank you for your help, I really appreciate it As the file is large, I will send it to you via Wetransfer.

https://we.tl/t-mXXIpSAVOT

Good luck

Hi,

Same issue with this code :

if (bool.Parse(configuration["Authentication:OpenId:IsEnabled"])) { //if (bool.Parse(configuration["Authentication:AllowSocialLoginSettingsPerTenant"])) //{ // services.AddSingleton<IOptionsMonitor<OpenIdConnectOptions>, TenantBasedOpenIdConnectOptions>(); //}

  services
  // Add support for OpenId authentication
  .AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
  .AddMicrosoftIdentityWebApp(configuration, "Authentication:AzureAd")
  .EnableTokenAcquisitionToCallDownstreamApi(initialScopes)
  .AddMicrosoftGraph(configuration.GetSection("Authentication:DownstreamApi"))
  .AddInMemoryTokenCaches();

  // Require an authenticated user
  //services.AddControllersWithViews(options =>
  //{
  //    var policy = new AuthorizationPolicyBuilder()
  //        .RequireAuthenticatedUser()
  //        .Build();
  //    options.Filters.Add(new AuthorizeFilter(policy));
  //});

  //services
  //    // Add Razor Pages support
  //    .AddRazorPages()

  //    // Add Microsoft Identity UI pages that provide user 
  //    .AddMicrosoftIdentityUI();

  services.AddScoped&lt;GraphProfileClient&gt;();
  services.AddScoped&lt;GraphEmailClient&gt;();
  //services.AddScoped&lt;GraphCalendarClient&gt;();
  //services.AddScoped&lt;GraphFilesClient&gt;();

};

Hi Yes it’s a single project I still running Yarn

Thks

Hi What do you mean by server side ?

Answer

Hi,

Sorry i don't understand how i can achieve this ?

Thks for your help

Hi,

The OpenconnectId and Microsoft graph connection seems to work well now. But I'm facing another issue now. When I want to view emails I am systemically redirected by this method which seems to pose an issue.

ERUDYEntityFrameworkCoreModule

[DependsOn( typeof(AbpZeroCoreEntityFrameworkCoreModule), typeof(ERUDYCoreModule) )] public class ERUDYEntityFrameworkCoreModule : AbpModule { /* Used it tests to skip DbContext registration, in order to use in-memory database of EF Core */ public bool SkipDbContextRegistration { get; set; }

 public bool SkipDbSeed { get; set; }

 public override void PreInitialize()
 {
     if (!SkipDbContextRegistration)
     {
         Configuration.Modules.AbpEfCore().AddDbContext&lt;ERUDYDbContext&gt;(options =>
         {
             if (options.ExistingConnection != null)
             {
                 ERUDYDbContextConfigurer.Configure(options.DbContextOptions,
                     options.ExistingConnection);
             }
             else
             {
                 ERUDYDbContextConfigurer.Configure(options.DbContextOptions,
                     options.ConnectionString);
             }
         });
     }

     // Set this setting to true for enabling entity history.
     Configuration.EntityHistory.IsEnabled = false;

     // Uncomment below line to write change logs for the entities below:
     // Configuration.EntityHistory.Selectors.Add("ERUDYEntities", EntityHistoryHelper.TrackedTypes);
     // Configuration.CustomConfigProviders.Add(new EntityHistoryConfigProvider(Configuration));
 }

 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(ERUDYEntityFrameworkCoreModule).GetAssembly());
 }

 public override void PostInitialize()
 {
     var configurationAccessor = IocManager.Resolve&lt;IAppConfigurationAccessor&gt;();

     using (var scope = IocManager.CreateScope())
     {
         if (!SkipDbSeed && scope.Resolve&lt;DatabaseCheckHelper&gt;()
                 .Exist(configurationAccessor.Configuration["ConnectionStrings:Default"]))
         {
             SeedHelper.SeedHostDb(IocManager);
         }
     }
 }

}

And the resut email display is :

Have you an idea of what causes this issue ?

Thks very much

Showing 41 to 50 of 93 entries