36 writes to Id
Aspire.Hosting.Azure.EntraId.Tests (36)
EntraIdApiProvisioningTests.cs (36)
133var api = builder.AddEntraIdApplication("entra-api").WithScope("access_as_user", ScopeDescription, scope => scope.Id = id); 169var api = builder.AddEntraIdApplication("entra-api").WithScope("access_as_user", ScopeDescription, scope => scope.Id = id); 172Assert.Throws<ArgumentException>(() => api.WithScope("other", ScopeDescription, scope => scope.Id = id)); 392.WithScope("orders.read", "Read orders.", scope => scope.Id = Guid.Parse("11112222-aaaa-3333-bbbb-4444cccc5555")); 394.WithScope("items.read", "Read items.", scope => scope.Id = Guid.Parse("22223333-aaaa-4444-bbbb-5555cccc6666")); 409.WithScope("orders.read", "Read orders.", scope => scope.Id = Guid.NewGuid()); 430existingApi.Resource.Scopes[0].Id = id; 496.WithScope("items.read", "Read items.", scope => scope.Id = Guid.NewGuid()); 701existing.WithScope("items.read", "Read items.", scope => scope.Id = Guid.NewGuid()); 703existingWithoutUri.WithScope("items.read", "Read items.", scope => scope.Id = Guid.NewGuid()); 815.WithScope("orders.read", "Read orders.", scope => scope.Id = Guid.NewGuid()); 818.WithScope("items.read", "Read items.", scope => scope.Id = Guid.NewGuid()); 841.WithScope("items.read", "Read items.", scope => scope.Id = Guid.NewGuid()); 925.WithApplicationIdUri("api://orders").WithScope("orders.read", "Read orders.", s => s.Id = Guid.NewGuid()); 927.WithApplicationIdUri("api://items").WithScope("items.read", "Read items.", s => s.Id = Guid.NewGuid()); 971.WithScope("access_as_user", ScopeDescription, scope => scope.Id = Guid.NewGuid()) 972.WithScope("retired", "Retired.", scope => { scope.Id = Guid.NewGuid(); scope.IsEnabled = false; }) 973.WithScope("other", "Another scope.", scope => scope.Id = Guid.NewGuid()); 1040.WithScope("access_as_user", ScopeDescription, scope => scope.Id = Guid.NewGuid()); 1062.WithScope("access_as_user", ScopeDescription, scope => scope.Id = Guid.NewGuid()); 1080.WithScope("access_as_user", ScopeDescription, scope => scope.Id = Guid.NewGuid()); 1100.WithScope("access_as_user", ScopeDescription, scope => scope.Id = Guid.NewGuid()); 1130.WithApplicationIdUri("api://orders").WithScope("orders.read", "Read orders.", s => s.Id = Guid.NewGuid()); 1132.WithApplicationIdUri("api://items").WithScope("items.read", "Read items.", s => s.Id = Guid.NewGuid()); 1152.WithScope("items.read", "Read items.", s => s.Id = Guid.NewGuid()); 1168.WithApplicationIdUri("api://items").WithScope("items.read", "Read items.", s => s.Id = Guid.NewGuid()); 1312.WithScope("read", "Read", scope => scope.Id = Guid.NewGuid()); 1341.WithScope("read", "Read", scope => scope.Id = Guid.NewGuid()) 1342.WithScope("write", "Write", scope => scope.Id = Guid.NewGuid()); 1394.WithScope("read", "Read", scope => scope.Id = Guid.NewGuid()); 1397.WithScope("read", "Read", scope => scope.Id = Guid.NewGuid()); 1523api.Resource.Scopes[0].Id = adoptedId; 1543.WithScope("orders.read", "Read orders.", scope => scope.Id = firstId); 1546existingApi.Resource.Scopes[0].Id = secondId; 1559.WithScope("orders.read", "Read orders.", scope => scope.Id = Guid.NewGuid()); 1562existingApi.Resource.Scopes[0].Id = null;
7 references to Id
Aspire.Hosting.Azure.EntraId (7)
EntraIdApi.cs (2)
352/// The scope's ID is stable across deployments: unless <see cref="Id"/> is set, it derives from the registration's name and the 415/// reads its ID when the template is generated, because <see cref="EntraIdScope.Id"/> can still be set after the permission is declared and
EntraIdApplicationResource.cs (1)
861if (scope.Id is { } id)
EntraIdResourceExtensions.cs (4)
1624/// The name is invalid or already used by another scope, or the explicit <see cref="EntraIdScope.Id"/> is already used by another scope. 1638/// Set <see cref="EntraIdScope.Id"/> to the ID of the scope that the registration defines. 1671if (scope.Id is { } id && resource.Scopes.Any(s => s.Id == id))