Skip to content

Commit

Permalink
Merge pull request #1176 from solliancenet/mg-fix-e2e-scopes
Browse files Browse the repository at this point in the history
Resolved issues around scopes in E2E pipelines
  • Loading branch information
ciprianjichici authored Jun 25, 2024
2 parents 415df5d + 62bd38d commit 9d80fbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/dotnet/Common/Constants/Authentication/ScopeURIs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ public static class ScopeURIs
/// <summary>
/// The Application ID URI for the Core API.
/// </summary>
public const string FoundationaLLM_Core = "api://FoundationaLLM-Auth"; //"api://FoundationaLLM-Core";
public const string FoundationaLLM_Core = "api://FoundationaLLM-Core";
/// <summary>
/// The Application ID URI for the Authorization API.
/// </summary>
public const string FoundationaLLM_Authorization = "api://FoundationaLLM-Authorization-Auth"; //"api://FoundationaLLM-Authorization";
public const string FoundationaLLM_Authorization = "api://FoundationaLLM-Authorization";
/// <summary>
/// The Application ID URI for the Management API.
/// </summary>
public const string FoundationaLLM_Management = "api://FoundationaLLM-Management-Auth"; //"api://FoundationaLLM-Management";
public const string FoundationaLLM_Management = "api://FoundationaLLM-Management";
}
}
9 changes: 6 additions & 3 deletions tests/scripts/Set-AzdEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ $ErrorActionPreference = "Stop"

# Set the environment values
$fllmApiAppId = (az ad app list --display-name "$fllmApiName" --query "[].{appId:appId,displayName:displayName}[?displayName=='$fllmApiName'].appId" --output tsv) # FLLM Core API
$fllmApiAppUris = @(az ad app list --display-name "$fllmApiName" --query "[].identifierUris" --output json | ConvertFrom-Json)
$fllmClientAppId = (az ad app list --display-name "$fllmClientName" --query "[].{appId:appId,displayName:displayName}[?displayName=='$fllmClientName'].appId" --output tsv) # FLLM UI
$fllmMgmtApiAppId = (az ad app list --display-name "$fllmMgmtApiName" --query "[].{appId:appId,displayName:displayName}[?displayName=='$fllmMgmtApiName'].appId" --output tsv) # FLLM Management API
$fllmMgmtApiAppUris = @(az ad app list --display-name "$fllmMgmtApiName" --query "[].identifierUris" --output json | ConvertFrom-Json)
$fllmMgmtClientAppId = (az ad app list --display-name "$fllmMgmtClientName" --query "[].{appId:appId,displayName:displayName}[?displayName=='$fllmMgmtClientName'].appId" --output tsv) # FLLM Management UI
$fllmAuthApiAppId = (az ad app list --display-name "$fllmAuthApiName" --query "[].{appId:appId,displayName:displayName}[?displayName=='$fllmAuthApiName'].appId" --output tsv) # FLLM Authorization API
$fllmAuthApiAppUris = @(az ad app list --display-name "$fllmAuthApiName" --query "[].identifierUris" --output json | ConvertFrom-Json)
$fllmAdminGroupId = (az ad group show --group "$fllmAdminGroupName" --query 'id' --output tsv) # FLLM Admin AD Group

$values = @(
Expand All @@ -71,7 +74,7 @@ $values = @(
},
@{
Key = "ENTRA_CHAT_UI_SCOPES"
Value = "api://$fllmApiName/Data.Read"
Value = "$($fllmApiAppUris[0])/Data.Read"
},
@{
Key = "ENTRA_CHAT_UI_TENANT_ID"
Expand Down Expand Up @@ -110,7 +113,7 @@ $values = @(
},
@{
Key = "ENTRA_MANAGEMENT_UI_SCOPES"
Value = "api://$fllmMgmtApiName/Data.Manage"
Value = "$($fllmMgmtApiAppUris[0])/Data.Manage"
},
@{
Key = "ENTRA_MANAGEMENT_UI_TENANT_ID"
Expand All @@ -123,7 +126,7 @@ $values = @(
},
@{
Key = "ENTRA_AUTH_API_SCOPES"
Value = "api://$fllmAuthApiName"
Value = "$($fllmAuthApiAppUris[0])"
},
@{
Key = "ENTRA_AUTH_API_TENANT_ID"
Expand Down

0 comments on commit 9d80fbd

Please sign in to comment.