-
Notifications
You must be signed in to change notification settings - Fork 215
Description
The Get-MgGroupLifecyclePolicy cmdlet currently issues requests against the /beta/groupLifecyclePolicies endpoint. However, a relationship on the group object with the same name exists, groupLifecyclePolicies. Thus, the method used to fetch said property overlaps with the cmdlet name, rendering it unavailable.
An example to make this clearer. To get the groupLifecyclePolicies assigned to a given group, one can use the following request:
GET https://graph.microsoft.com/beta/groups/18744c33-db33-421a-817f-7f9f016057e9/groupLifecyclePolicies
Like any other reference properties, this should be "translated" as Get-MgGroupLifecyclePolicy within the SDK.
To list all groupLifecyclePolicies objects within the tenant, one can use:
GET https://graph.microsoft.com/beta/groupLifecyclePolicies
The SDK implementation of the above bears the same exact cmdlet name, Get-MgGroupLifecyclePolicy. This effectively makes the "query the groupLifecyclePolicies reference property for given group" task impossible. A possible solution would be to rework the cmdlet to address the first scenario, and provide a new cmdlet to fetch the groupLifecyclePolicies objects, say Get-GroupLifecyclePolicies, or Get-GroupLifecyclePolicyObject or whatever.
Module version 1.9.6, PS version 7.2.4.