25 references to Scopes
Aspire.Hosting.Azure.EntraId (7)
EntraIdResourceExtensions.cs (6)
2103if (resource.Scopes.Any(s => string.Equals(s.Name, name, StringComparison.OrdinalIgnoreCase))) 2111if (scope.Id is { } id && resource.Scopes.Any(s => s.Id == id)) 2565var scope = api.Scopes.FirstOrDefault(s => string.Equals(s.Name, name, StringComparison.Ordinal)) 2568$"Exposed scopes: {(api.Scopes.Count == 0 ? "none" : string.Join(", ", api.Scopes.Select(s => s.Name)))}.", 2856var exposedScopes = entra.Scopes.Where(static s => s.IsEnabled).Select(static s => s.Name).ToArray();
Provisioning\EntraIdApiProvisioning.cs (1)
88foreach (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); 430existingApi.Resource.Scopes[0].Id = id; 462api.Resource.Scopes[0].IsEnabled = false; 482api.Resource.Scopes[0].IsEnabled = false; 502existingApi.Resource.Scopes[0].IsEnabled = false; 1519var derivedId = api.Resource.GetScopeId(api.Resource.Scopes[0]).ToString("D"); 1523api.Resource.Scopes[0].Id = adoptedId; 1546existingApi.Resource.Scopes[0].Id = secondId; 1562existingApi.Resource.Scopes[0].Id = null;
EntraIdPolyglotTests.cs (1)
453Assert.Single(api.Resource.Scopes);