42 writes to Id
Aspire.Hosting.Azure.EntraId (1)
EntraIdResourceExtensions.cs (1)
2479
scope.
Id
= Guid.TryParse(options.Id, out var id)
Aspire.Hosting.Azure.EntraId.Tests (41)
EntraIdApiProvisioningTests.cs (37)
133
var api = builder.AddEntraIdApplication("entra-api").WithScope("access_as_user", ScopeDescription, scope => scope.
Id
= id);
169
var api = builder.AddEntraIdApplication("entra-api").WithScope("access_as_user", ScopeDescription, scope => scope.
Id
= id);
172
Assert.Throws<ArgumentException>(() => api.WithScope("other", ScopeDescription, scope => scope.
Id
= id));
274
.WithScope("read", "Read data.", scope => scope.
Id
= Guid.Parse(ClientId))
442
.WithScope("orders.read", "Read orders.", scope => scope.
Id
= Guid.Parse("11112222-aaaa-3333-bbbb-4444cccc5555"));
444
.WithScope("items.read", "Read items.", scope => scope.
Id
= Guid.Parse("22223333-aaaa-4444-bbbb-5555cccc6666"));
459
.WithScope("orders.read", "Read orders.", scope => scope.
Id
= Guid.NewGuid());
480
existingApi.Resource.Scopes[0].
Id
= id;
546
.WithScope("items.read", "Read items.", scope => scope.
Id
= Guid.NewGuid());
751
existing.WithScope("items.read", "Read items.", scope => scope.
Id
= Guid.NewGuid());
753
existingWithoutUri.WithScope("items.read", "Read items.", scope => scope.
Id
= Guid.NewGuid());
865
.WithScope("orders.read", "Read orders.", scope => scope.
Id
= Guid.NewGuid());
868
.WithScope("items.read", "Read items.", scope => scope.
Id
= Guid.NewGuid());
891
.WithScope("items.read", "Read items.", scope => scope.
Id
= Guid.NewGuid());
975
.WithApplicationIdUri("api://orders").WithScope("orders.read", "Read orders.", s => s.
Id
= Guid.NewGuid());
977
.WithApplicationIdUri("api://items").WithScope("items.read", "Read items.", s => s.
Id
= Guid.NewGuid());
1021
.WithScope("access_as_user", ScopeDescription, scope => scope.
Id
= Guid.NewGuid())
1022
.WithScope("retired", "Retired.", scope => { scope.
Id
= Guid.NewGuid(); scope.IsEnabled = false; })
1023
.WithScope("other", "Another scope.", scope => scope.
Id
= Guid.NewGuid());
1090
.WithScope("access_as_user", ScopeDescription, scope => scope.
Id
= Guid.NewGuid());
1112
.WithScope("access_as_user", ScopeDescription, scope => scope.
Id
= Guid.NewGuid());
1130
.WithScope("access_as_user", ScopeDescription, scope => scope.
Id
= Guid.NewGuid());
1150
.WithScope("access_as_user", ScopeDescription, scope => scope.
Id
= Guid.NewGuid());
1180
.WithApplicationIdUri("api://orders").WithScope("orders.read", "Read orders.", s => s.
Id
= Guid.NewGuid());
1182
.WithApplicationIdUri("api://items").WithScope("items.read", "Read items.", s => s.
Id
= Guid.NewGuid());
1202
.WithScope("items.read", "Read items.", s => s.
Id
= Guid.NewGuid());
1218
.WithApplicationIdUri("api://items").WithScope("items.read", "Read items.", s => s.
Id
= Guid.NewGuid());
1362
.WithScope("read", "Read", scope => scope.
Id
= Guid.NewGuid());
1391
.WithScope("read", "Read", scope => scope.
Id
= Guid.NewGuid())
1392
.WithScope("write", "Write", scope => scope.
Id
= Guid.NewGuid());
1444
.WithScope("read", "Read", scope => scope.
Id
= Guid.NewGuid());
1447
.WithScope("read", "Read", scope => scope.
Id
= Guid.NewGuid());
1573
api.Resource.Scopes[0].
Id
= adoptedId;
1593
.WithScope("orders.read", "Read orders.", scope => scope.
Id
= firstId);
1596
existingApi.Resource.Scopes[0].
Id
= secondId;
1609
.WithScope("orders.read", "Read orders.", scope => scope.
Id
= Guid.NewGuid());
1612
existingApi.Resource.Scopes[0].
Id
= null;
EntraIdPolyglotTests.cs (2)
461
scope.
Id
= scopeId;
504
.WithScope("orders.read", "Read orders.", scope => scope.
Id
= scopeId);
EntraIdProvisioningTests.cs (2)
152
.WithScope("read", "Read data.", scope => scope.
Id
= Guid.Parse(ClientId));
154
.WithScope("read", "Read data.", scope => scope.
Id
= Guid.Parse(ClientId))
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)
1022
if (scope.
Id
is { } id)
EntraIdResourceExtensions.cs (4)
2380
/// The name is invalid or already used by another scope, or the explicit <see cref="EntraIdScope.
Id
"/> is already used by another scope.
2394
/// Set <see cref="EntraIdScope.
Id
"/> to the ID of the scope that the registration defines.
2428
if (scope.
Id
is { } id && resource.Scopes.Any(s => s.
Id
== id))