Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public class AgentUserIdentityTests
{
string instance = "https://login.microsoftonline.com/";
string tenantId = "31a58c3b-ae9c-4448-9e8f-e9e143e800df"; // Replace with your tenant ID
string agentApplication = "c4b2d4d9-9257-4c1a-a5c0-0a4907c83411"; // Replace with the actual agent application client ID
string agentIdentity = "44250d7d-2362-4fba-9ba0-49c19ae270e0"; // Replace with the actual agent identity
string userUpn = "aui3@msidlabtoint.onmicrosoft.com"; // Replace with the actual user upn.
string agentApplication = "d05619c9-dbf2-4e60-95fd-cc75dd0db451"; // Replace with the actual agent application client ID
string agentIdentity = "edbfbbe7-d240-40dd-aee2-435201dbaa9c"; // Replace with the actual agent identity
string userUpn = "agentuser1@msidlabtoint.onmicrosoft.com"; // Replace with the actual user upn.

[Fact]
public async Task AgentUserIdentityGetsTokenForGraphAsync()
Expand Down Expand Up @@ -254,7 +254,7 @@ public async Task AgentUserIdentityGetsTokenForGraphWithCacheAsync()
[Fact]
public async Task AgentUserIdentityGetsTokenForGraphByUserIdAsync()
{
string userOid = "04ea4dcd-f314-476f-be31-a13707cdd11e"; // Replace with the actual user OID.
string userOid = "03d648e4-2e01-4dfb-b21d-81eb678fbcf4"; // Replace with the actual user OID.

IServiceCollection services = new ServiceCollection();

Expand Down
4 changes: 2 additions & 2 deletions tests/E2E Tests/AgentApplications/AutonomousAgentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public async Task AutonomousAgentGetsAppTokenForAgentIdentityToCallGraphAsync()

configuration["AzureAd:Instance"] = "https://login.microsoftonline.com/";
configuration["AzureAd:TenantId"] = "31a58c3b-ae9c-4448-9e8f-e9e143e800df";
configuration["AzureAd:ClientId"] = "d15884b6-a447-4dd5-a5a5-a668c49f6300"; // Agent application.
configuration["AzureAd:ClientId"] = "d05619c9-dbf2-4e60-95fd-cc75dd0db451"; // Agent application.
configuration["AzureAd:ClientCredentials:0:SourceType"] = "StoreWithDistinguishedName";
configuration["AzureAd:ClientCredentials:0:CertificateStorePath"] = "LocalMachine/My";
configuration["AzureAd:ClientCredentials:0:CertificateDistinguishedName"] = "CN=LabAuth.MSIDLab.com";
Expand All @@ -39,7 +39,7 @@ public async Task AutonomousAgentGetsAppTokenForAgentIdentityToCallGraphAsync()
services.AddMicrosoftGraph(); // If you want to call Microsoft Graph
var serviceProvider = services.BuildServiceProvider();

string agentIdentity = "d84da24a-2ea2-42b8-b5ab-8637ec208024"; // Replace with the actual agent identity
string agentIdentity = "edbfbbe7-d240-40dd-aee2-435201dbaa9c"; // Replace with the actual agent identity

//// Get an authorization header and handle the call to the downstream API yoursel
IAuthorizationHeaderProvider authorizationHeaderProvider = serviceProvider.GetService<IAuthorizationHeaderProvider>()!;
Expand Down
4 changes: 2 additions & 2 deletions tests/E2E Tests/AgentApplications/GetFicAsyncTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public async Task GetFicTokensTestsAsync()
{
string instance = "https://login.microsoftonline.com/";
string tenantId = "31a58c3b-ae9c-4448-9e8f-e9e143e800df"; // Replace with your tenant ID
string agentApplication = "d15884b6-a447-4dd5-a5a5-a668c49f6300"; // Replace with the actual agent application client ID
string agentIdentity = "d84da24a-2ea2-42b8-b5ab-8637ec208024"; // Replace with the actual agent identity
string agentApplication = "d05619c9-dbf2-4e60-95fd-cc75dd0db451"; // Replace with the actual agent application client ID
string agentIdentity = "edbfbbe7-d240-40dd-aee2-435201dbaa9c"; // Replace with the actual agent identity

IServiceCollection services = new ServiceCollection();

Expand Down
5 changes: 3 additions & 2 deletions tests/E2E Tests/Sidecar.Tests/SidecarApiFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ internal SidecarApiFactory(Action<IConfigurationBuilder>? configureOptions)
{
{ "AzureAd:Instance", "https://login.microsoftonline.com/" },
{ "AzureAd:TenantId", "31a58c3b-ae9c-4448-9e8f-e9e143e800df" },
{ "AzureAd:ClientId", "d15884b6-a447-4dd5-a5a5-a668c49f6300" },
{ "AzureAd:Audience", "d15884b6-a447-4dd5-a5a5-a668c49f6300" },
{ "AzureAd:ClientId", "d05619c9-dbf2-4e60-95fd-cc75dd0db451" },
{ "AzureAd:Audience", "d05619c9-dbf2-4e60-95fd-cc75dd0db451" },
{ "AzureAd:AllowWebApiToBeAuthorizedByACL", "true" },
{ "AzureAd:ClientCredentials:0:SourceType", "StoreWithDistinguishedName" },
{ "AzureAd:ClientCredentials:0:CertificateStorePath", "LocalMachine/My" },
{ "AzureAd:ClientCredentials:0:CertificateDistinguishedName", "CN=LabAuth.MSIDLab.com" }, // Replace with the subject name of your certificate
Expand Down
10 changes: 5 additions & 5 deletions tests/E2E Tests/Sidecar.Tests/SidecarEndpointsE2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public class SidecarEndpointsE2ETests : IClassFixture<SidecarApiFactory>
public SidecarEndpointsE2ETests(SidecarApiFactory factory) => _factory = factory;

const string TenantId = "31a58c3b-ae9c-4448-9e8f-e9e143e800df"; // Replace with your tenant ID
const string AgentApplication = "d15884b6-a447-4dd5-a5a5-a668c49f6300"; // Replace with the actual agent application client ID
const string AgentIdentity = "d84da24a-2ea2-42b8-b5ab-8637ec208024"; // Replace with the actual agent identity
const string UserUpn = "aui1@msidlabtoint.onmicrosoft.com"; // Replace with the actual user upn.
string UserOid = "51c1aa1c-f6d0-4a92-936c-cadb27b717f2"; // Replace with the actual user OID.
const string AgentApplication = "d05619c9-dbf2-4e60-95fd-cc75dd0db451"; // Replace with the actual agent application client ID
const string AgentIdentity = "edbfbbe7-d240-40dd-aee2-435201dbaa9c"; // Replace with the actual agent identity
const string UserUpn = "agentuser1@msidlabtoint.onmicrosoft.com"; // Replace with the actual user upn.
string UserOid = "03d648e4-2e01-4dfb-b21d-81eb678fbcf4"; // Replace with the actual user OID.

[Fact]
public async Task Validate_WhenBadTokenAsync()
Expand Down Expand Up @@ -187,7 +187,7 @@ private static async Task<string> GetAuthorizationHeaderToCallTheSideCarAsync()
IServiceProvider serviceProvider = services.BuildServiceProvider();

IAuthorizationHeaderProvider authorizationHeaderProvider = serviceProvider.GetRequiredService<IAuthorizationHeaderProvider>();
string authorizationHeader = await authorizationHeaderProvider.CreateAuthorizationHeaderForAppAsync("api://d15884b6-a447-4dd5-a5a5-a668c49f6300/.default",
string authorizationHeader = await authorizationHeaderProvider.CreateAuthorizationHeaderForAppAsync("api://d05619c9-dbf2-4e60-95fd-cc75dd0db451/.default",
new AuthorizationHeaderProviderOptions()
{
AcquireTokenOptions = new AcquireTokenOptions()
Expand Down
Loading