Skip to content

Commit 857f798

Browse files
committed
Fix NetCoreTestApp to use multi-tenant app from lab
- Use LabUserHelper.GetDefaultUserWithMultiTenantAppAsync() to get correct multi-tenant app ID - Resolves AADSTS50194 error when using /common endpoint with single-tenant app - Ensures proper multi-tenant configuration for testing scenarios - Added LabInfrastructure using statement for lab integration
1 parent fab8f37 commit 857f798

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/devapps/NetCoreTestApp/Program.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.Identity.Client.Broker;
1717
using Microsoft.Identity.Client.Extensibility;
1818
using Microsoft.Identity.Test.Integration.NetFx.Infrastructure;
19+
using Microsoft.Identity.Test.LabInfrastructure;
1920
using NetCoreTestApp.Experimental;
2021

2122
namespace NetCoreTestApp
@@ -28,8 +29,8 @@ public class Program
2829
{ "caller-sdk-ver", "123" }
2930
};
3031

31-
// This app has http://localhost redirect uri registered
32-
private static readonly string s_clientIdForPublicApp = "1d18b3b0-251b-4714-a02a-9956cec86c2d";
32+
// This app will be dynamically set to the multi-tenant app from lab
33+
private static readonly string s_clientIdForPublicApp = LabUserHelper.GetDefaultUserWithMultiTenantAppAsync().Result.App.AppId;
3334

3435
private static readonly string s_username = ""; // used for WIA and U/P, cannot be empty on .net core
3536

0 commit comments

Comments
 (0)