1

I am building three applications(single tenant) using .NET 6. I need to host the application in below pattern -

  1. https://www.MainApp.com(Main application)
  2. https://www.MainApp.com/subapp1(Sub application1).
  3. https://www.MainApp.com/subapp2(Sub application2).

I am using Microsoft.Identity (Azure AD authentication ) and Microsoft Graph API.

These application use the same app registration (even client and secret id is same across the application).

I have been intermittently getting MSAL EXCEPTIONS : No account or login hint was passed to the AcquireTokenSilent call . I followed this link and have verified all configurations from my end and everything seems to be fine.

I am also facing an issue while switching between the apps the microsoft login url goes on an infinite loop and then throws error saying Couldn't sign you in.

Any help will be much appreciated.

Please do let us know if you need any further details from my end.

Rohit
  • 96
  • 1
  • 7
  • Can you show a little bit of your project structure and how do you initialize GraphServiceClient ? – Gopal Zadafiya May 20 '23 at 18:27
  • use only one app registration should be ok, error ` No account or login hint was passed` --> do you have code like this `.EnableTokenAcquisitionToCallDownstreamApi() .AddMicrosoftGraph(builder.Configuration.GetSection("DownstreamApi")) .AddInMemoryTokenCaches()`? `login url goes on an infinite loop` --> using OWIN might had this issue, but you used .net6, so I don't have any ideas about it. – Tiny Wang May 22 '23 at 09:18
  • Yes, I have a similar code which you have mentioned. – Rohit May 23 '23 at 09:29

0 Answers0