25 references to Scopes
Aspire.Hosting.Azure.EntraId (7)
EntraIdResourceExtensions.cs (6)
2418if (resource.Scopes.Any(s => string.Equals(s.Name, name, StringComparison.OrdinalIgnoreCase))) 2426if (scope.Id is { } id && resource.Scopes.Any(s => s.Id == id)) 2887var scope = api.Scopes.FirstOrDefault(s => string.Equals(s.Name, name, StringComparison.Ordinal)) 2890$"Exposed scopes: {(api.Scopes.Count == 0 ? "none" : string.Join(", ", api.Scopes.Select(s => s.Name)))}.", 3189var exposedScopes = entra.Scopes.Where(static s => s.IsEnabled).Select(static s => s.Name).ToArray();
Provisioning\EntraIdApiProvisioning.cs (1)
91foreach (var scope in resource.Scopes)
Aspire.Hosting.Azure.EntraId.Tests (18)
EntraIdApiProvisioningTests.cs (17)
99return api.Resource.GetScopeId(Assert.Single(api.Resource.Scopes)); 120var id = first.Resource.GetScopeId(first.Resource.Scopes[0]); 122first.Resource.Scopes[0].Description = "A different description."; 124Assert.Equal(id, first.Resource.GetScopeId(first.Resource.Scopes[0])); 125Assert.NotEqual(id, second.Resource.GetScopeId(second.Resource.Scopes[0])); 135Assert.Equal(id, api.Resource.GetScopeId(Assert.Single(api.Resource.Scopes))); 151Assert.Empty(api.Resource.Scopes); 173Assert.Single(api.Resource.Scopes); 186Assert.Equal(name, Assert.Single(api.Resource.Scopes).Name); 480existingApi.Resource.Scopes[0].Id = id; 512api.Resource.Scopes[0].IsEnabled = false; 532api.Resource.Scopes[0].IsEnabled = false; 552existingApi.Resource.Scopes[0].IsEnabled = false; 1569var derivedId = api.Resource.GetScopeId(api.Resource.Scopes[0]).ToString("D"); 1573api.Resource.Scopes[0].Id = adoptedId; 1596existingApi.Resource.Scopes[0].Id = secondId; 1612existingApi.Resource.Scopes[0].Id = null;
EntraIdPolyglotTests.cs (1)
544Assert.Single(api.Resource.Scopes);