Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/DirectoryObjects/DirectoryObjects.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,73 +15,102 @@ require:

> see https://github.com/Azure/autorest/blob/master/docs/powershell/directives.md

Wrapper migration audit: all 17 shared cmdlet groups are accounted for in
`wrapper/DirectoryObjects_directiveMigrationMap.json`. Neither compatible profile
contains PKI routes; v1.0 has none in its legacy source either, while the ledger
records the exact legacy beta methods, paths, and operation IDs. No speculative
suppression overrides are needed. `DirectoryObjectsDirectiveMigrationTests`
pins the evidence and preserves the live directoryObjects neighbors.

Profile-local readmes and `src/readme.graph.md` are intentionally excluded.
There are no shared parameter/schema directives here; those classes remain
deferred. Keep every original AutoRest directive active until that pipeline is
retired.

``` yaml
directive:
# Remove duplicate cmdlets.
# Wrapper audit group 1: beta certificate-authority DELETE is absent in compatible specs.
- where:
verb: Remove
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority$
remove: true
# Wrapper audit group 2: beta configuration PATCH is absent in compatible specs.
- where:
verb: Update
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration$
remove: true
# Wrapper audit group 3: beta PKI PATCH is absent in compatible specs.
- where:
verb: Update
subject: ^DirectoryPublicKeyInfrastructure$
remove: true
# Wrapper audit group 4: exact duplicate of group 1; retained and audited separately.
- where:
verb: Remove
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority$
remove: true
# Wrapper audit group 5: beta certificate-authority POST is absent in compatible specs.
- where:
verb: New
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority$
remove: true
# Wrapper audit group 6: literal Mg-prefixed subject matches no legacy subject.
- where:
verb: New
subject: ^MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration$
remove: true
# Wrapper audit group 7: beta qualified upload action is absent in compatible specs.
- where:
verb: Invoke
subject: ^UploadDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration$
remove: true
# Wrapper audit group 8: beta configuration count GET is absent in compatible specs.
- where:
verb: Get
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCount$
remove: true
# Wrapper audit group 9: literal MgBeta-prefixed subject matches no legacy subject.
- where:
verb: Get
subject: ^MgBetaDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthorityCount$
remove: true
# Wrapper audit group 10: beta certificate-authority collection/item GETs are absent.
- where:
verb: Get
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority$
remove: true
# Wrapper audit group 11: beta configuration collection/item GETs are absent.
- where:
verb: Get
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration$
remove: true
# Wrapper audit group 12: beta PKI GET is absent in compatible specs.
- where:
verb: Get
subject: ^DirectoryPublicKeyInfrastructure$
remove: true
# Wrapper audit group 13: beta certificate-authority count GET is absent.
- where:
verb: Get
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthorityCount$
remove: true
# Wrapper audit group 14: beta configuration POST is absent in compatible specs.
- where:
verb: New
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration$
remove: true
# Wrapper audit group 15: beta PKI DELETE is absent in compatible specs.
- where:
verb: Remove
subject: ^DirectoryPublicKeyInfrastructure$
remove: true
# Wrapper audit group 16: beta configuration DELETE is absent in compatible specs.
- where:
verb: Remove
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration$
remove: true
# Wrapper audit group 17: beta certificate-authority PATCH is absent.
- where:
verb: Update
subject: ^DirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority$
Expand Down
6 changes: 3 additions & 3 deletions src/DirectoryObjects/wrapper/Beta/Client/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"descriptionHash": "A8D4B32B478CA08226B4BA393220FC34848F38C0E01F430B9482B15DCABDED3AD23517259CE0552B2C2521155D0676C898EBE2F69BC7CD9B37462535983ADC17",
"descriptionLocation": "../../../../../openApiDocs_KiotaCompat/Beta/DirectoryObjects.yml",
"descriptionHash": "DB394F6B45206251D450DD0E19F05AEA848AE0EEBF351C9D496E2DAD84D7306BE0E4D9D3E0841F5DDBC03896A6D0568C83EE658A47E81E0569739C776478D6E0",
"descriptionLocation": "../../../../../openApiDocs_KiotaCompat/beta/DirectoryObjects.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.34.1",
"kiotaVersion": "1.36.1",
"clientClassName": "ApiClient",
"typeAccessModifier": "Public",
"clientNamespaceName": "Microsoft.Graph.PowerShell.DirectoryObjects.Client",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class GetMgDirectoryObjectCommand : GraphClientCmdlet




[Parameter(Mandatory = false)]
[Alias("Select")]
public string[]? Property { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class GetMgDirectoryObjectCountCommand : GraphClientCmdlet
protected override void ProcessRecord()
{

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

int? result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class GetMgDirectoryObjectDeltaCommand : GraphClientCmdlet
protected override void ProcessRecord()
{

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

// Cleared before the request so a failed or interrupted run cannot leave the previous
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class GetMgDirectoryObject_GetCommand : GraphClientCmdlet
protected override void ProcessRecord()
{

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

Microsoft.Graph.PowerShell.DirectoryObjects.Client.Models.DirectoryObject? result;
Expand All @@ -50,6 +50,7 @@ protected override void ProcessRecord()




AddRequestHeaders(requestConfiguration.Headers);
}).GetAwaiter().GetResult();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class GetMgDirectoryObject_ListCommand : GraphClientCmdlet
protected override void ProcessRecord()
{

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

Microsoft.Graph.PowerShell.DirectoryObjects.Client.Models.DirectoryObjectCollectionResponse? result;
Expand Down Expand Up @@ -96,6 +96,7 @@ protected override void ProcessRecord()
requestConfiguration.QueryParameters.Count = true;



if (this.IsParameterBound(nameof(ConsistencyLevel)))
requestConfiguration.Headers.Add("ConsistencyLevel", ConsistencyLevel!);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected override void ProcessRecord()
if (this.IsParameterBound(nameof(GroupIds)))
body.GroupIds = GroupIds!.ToList();

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

global::Microsoft.Graph.PowerShell.DirectoryObjects.Client.DirectoryObjects.Item.CheckMemberGroups.CheckMemberGroupsPostResponse? result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected override void ProcessRecord()
if (this.IsParameterBound(nameof(Ids)))
body.Ids = Ids!.ToList();

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

global::Microsoft.Graph.PowerShell.DirectoryObjects.Client.DirectoryObjects.Item.CheckMemberObjects.CheckMemberObjectsPostResponse? result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected override void ProcessRecord()
if (this.IsParameterBound(nameof(Types)))
body.Types = Types!.ToList();

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

global::Microsoft.Graph.PowerShell.DirectoryObjects.Client.DirectoryObjects.GetByIds.GetByIdsPostResponse? result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected override void ProcessRecord()
if (this.IsParameterBound(nameof(SecurityEnabledOnly)))
body.SecurityEnabledOnly = SecurityEnabledOnly;

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

global::Microsoft.Graph.PowerShell.DirectoryObjects.Client.DirectoryObjects.Item.GetMemberGroups.GetMemberGroupsPostResponse? result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected override void ProcessRecord()
if (this.IsParameterBound(nameof(SecurityEnabledOnly)))
body.SecurityEnabledOnly = SecurityEnabledOnly;

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

global::Microsoft.Graph.PowerShell.DirectoryObjects.Client.DirectoryObjects.Item.GetMemberObjects.GetMemberObjectsPostResponse? result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected override void ProcessRecord()
if (this.IsParameterBound(nameof(Type)))
body.Type = Type;

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

Microsoft.Graph.PowerShell.DirectoryObjects.Client.Models.DirectoryObject? result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected override void ProcessRecord()
return;


var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

Microsoft.Graph.PowerShell.DirectoryObjects.Client.Models.DirectoryObject? result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected override void ProcessRecord()
if (this.IsParameterBound(nameof(OnBehalfOfUserId)))
body.OnBehalfOfUserId = OnBehalfOfUserId;

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected override void ProcessRecord()



var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

Microsoft.Graph.PowerShell.DirectoryObjects.Client.Models.DirectoryObject? result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override void ProcessRecord()
if (!ShouldProcess(DirectoryObjectId, "Remove"))
return;

var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

// DeleteAsync returns a plain Task: a standard delete response has no body.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected override void ProcessRecord()



var requestAdapter = GetRequestAdapter();
var requestAdapter = GetRequestAdapter("beta");
var client = new ApiClient(requestAdapter);

Microsoft.Graph.PowerShell.DirectoryObjects.Client.Models.DirectoryObject? result;
Expand All @@ -59,20 +59,6 @@ protected override void ProcessRecord()
return;
}


if (result is null)
{
WriteVerbose("PATCH succeeded with no response body, re-fetching the updated resource.");
try
{
result = client.DirectoryObjects[DirectoryObjectId].GetAsync().GetAwaiter().GetResult();
}
catch (Exception ex) when (ex is not PipelineStoppedException && ex is not OperationCanceledException)
{
ThrowGraphRequestFailed(ex, DirectoryObjectId);
return;
}
}
if (result is not null)
WriteObject(result);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"descriptionLocation": "../../../../../openApiDocs_KiotaCompat/Beta/DirectoryObjects.yml"
"descriptionLocation": "../../../../../openApiDocs_KiotaCompat/beta/DirectoryObjects.yml"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,16 @@
<ProjectReference Include="..\..\..\GraphWrapperRuntime\Runtime\Microsoft.Graph.Wrapper.Runtime.csproj" />
</ItemGroup>

<!-- The module folder may carry ONLY the wrapper assemblies plus the kiota dependencies the
installed Microsoft.Graph.Authentication module does not ship (Std.UriTemplate,
Microsoft.Kiota.Serialization.Multipart). Every other dependency must resolve from that
module's isolated load context: a copy here loads a second type identity into the default
<!-- The module folder carries ONLY the wrapper assemblies. Authentication ships the complete
Kiota dependency closure and bridges its contracts to generated cmdlets. Every dependency
must resolve from that module's isolated load context: a copy here loads a second type identity into the default
context, and the first request through the shared session pipeline dies casting between
the two (proven live: ObservabilityOptions, kiota middleware vs wrapper adapter).
Removal is by package identity, not filename, so the kept assemblies' versions stay
derived from the restore graph instead of being pinned here. -->
Removal is by package identity, not filename. -->
<Target Name="PruneModuleBin" AfterTargets="ResolveReferences">
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)"
Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' And '%(ReferenceCopyLocalPaths.NuGetPackageId)' != 'Std.UriTemplate' And '%(ReferenceCopyLocalPaths.NuGetPackageId)' != 'Microsoft.Kiota.Serialization.Multipart'" />
Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != ''" />
</ItemGroup>
</Target>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
using System.Collections.Generic;

namespace WrapperGenerator;
public static partial class CmdletConfigurator { private static readonly List<Entry> DirectoryObjectsCmdletConfigurations = []; }

public static partial class CmdletConfigurator
{
// DirectoryObjects.md's PKI routes are absent from both compatible specs.
// The adjacent migration ledger audits all 17 groups; do not prune live
// /directoryObjects operations or invent overrides for absent routes.
private static readonly List<Entry> DirectoryObjectsCmdletConfigurations = [];
}
Loading
Loading