diff --git a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentSchedule.md b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentSchedule.md index 093355d11d5..ad025c86b9e 100644 --- a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentSchedule.md +++ b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentSchedule.md @@ -1,18 +1,91 @@ -### Example 1: {{ Add title here }} +### Example 1: Get all assignment schedules + ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleAssignmentSchedule | Format-List + +ActivatedUsing : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleEligibilitySchedule +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +AssignmentType : Assigned +CreatedDateTime : +CreatedUsing : +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +Id : 4-PYiFWPHkqVOpuYmLiHa_CWtrDUYhRNsQq0vuB-N3E-1 +MemberType : Direct +ModifiedDateTime : +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : b0b696f0-62d4-4d14-b10a-b4bee07e3771 +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +ScheduleInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphRequestSchedule +Status : Provisioned +AdditionalProperties : {} -{{ Add output here }} +ActivatedUsing : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleEligibilitySchedule +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +AssignmentType : Activated +CreatedDateTime : 5/13/2022 8:14:33 AM +CreatedUsing : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +Id : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +MemberType : Direct +ModifiedDateTime : +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +ScheduleInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphRequestSchedule +Status : Provisioned +AdditionalProperties : {} ``` -{{ Add description here }} +This example gets all active role assignment schedules. This includes active roles assignments that have been created and the future scheduled assignments. + +### Example 2: Get all assignment schedules for a user -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleAssignmentSchedule -Filter "principalId eq '6c42590f-fcf0-4922-bac6-205f7c6aa89c'” -{{ Add output here }} -``` +ActivatedUsing : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleEligibilitySchedule +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +AssignmentType : Activated +CreatedDateTime : 5/13/2022 8:14:33 AM +CreatedUsing : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +Id : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +MemberType : Direct +ModifiedDateTime : +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +ScheduleInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphRequestSchedule +Status : Provisioned +AdditionalProperties : {} -{{ Add description here }} +ActivatedUsing : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleEligibilitySchedule +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +AssignmentType : Assigned +CreatedDateTime : 5/13/2022 8:33:37 AM +CreatedUsing : 9e98256e-58af-4d02-89ce-5134e2fe5508 +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +Id : 9e98256e-58af-4d02-89ce-5134e2fe5508 +MemberType : Direct +ModifiedDateTime : +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 9360feb5-f418-4baa-8175-e2a00bac4301 +ScheduleInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphRequestSchedule +Status : Provisioned +AdditionalProperties : {} +``` +This example gets all active role assignment schedules for a user. diff --git a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentScheduleInstance.md b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentScheduleInstance.md index 093355d11d5..5057c81492c 100644 --- a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentScheduleInstance.md +++ b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentScheduleInstance.md @@ -1,18 +1,87 @@ -### Example 1: {{ Add title here }} +### Example 1: Get all role assignment schedule instances + ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleAssignmentScheduleInstance | Format-List + +ActivatedUsing : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleEligibilityScheduleInstance +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +AssignmentType : Assigned +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +EndDateTime : +Id : 4-PYiFWPHkqVOpuYmLiHa_CWtrDUYhRNsQq0vuB-N3E-1 +MemberType : Direct +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : b0b696f0-62d4-4d14-b10a-b4bee07e3771 +RoleAssignmentOriginId : 4-PYiFWPHkqVOpuYmLiHa_CWtrDUYhRNsQq0vuB-N3E-1 +RoleAssignmentScheduleId : 4-PYiFWPHkqVOpuYmLiHa_CWtrDUYhRNsQq0vuB-N3E-1 +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +StartDateTime : +AdditionalProperties : {} + +ActivatedUsing : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleEligibilityScheduleInstance +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +AssignmentType : Activated +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +EndDateTime : 5/13/2022 11:14:32 AM +Id : 4-PYiFWPHkqVOpuYmLiHaw9ZQmzw_CJJusYgX3xqqJw-1 +MemberType : Direct +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleAssignmentOriginId : 4-PYiFWPHkqVOpuYmLiHaw9ZQmzw_CJJusYgX3xqqJw-1 +RoleAssignmentScheduleId : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +StartDateTime : 5/13/2022 8:14:33 AM +AdditionalProperties : {} -{{ Add output here }} +ActivatedUsing : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleEligibilityScheduleInstance +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +AssignmentType : Assigned +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +EndDateTime : +Id : lAPpYvVpN0KRkAEhdxReEENupG7coEFEgfvZ4yNW5ic-1 +MemberType : Direct +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6ea46e43-a0dc-4441-81fb-d9e32356e627 +RoleAssignmentOriginId : lAPpYvVpN0KRkAEhdxReEENupG7coEFEgfvZ4yNW5ic-1 +RoleAssignmentScheduleId : lAPpYvVpN0KRkAEhdxReEENupG7coEFEgfvZ4yNW5ic-1 +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 62e90394-69f5-4237-9190-012177145e10 +StartDateTime : +AdditionalProperties : {} ``` -{{ Add description here }} +This examples get all created active role assignments. + +### Example 2: Get all role assignment schedule instances for a user -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleAssignmentScheduleInstance -Filter "principalId eq '6c42590f-fcf0-4922-bac6-205f7c6aa89c'" | Format-List -{{ Add output here }} +ActivatedUsing : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleEligibilityScheduleInstance +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +AssignmentType : Activated +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +EndDateTime : 5/13/2022 11:14:32 AM +Id : 4-PYiFWPHkqVOpuYmLiHaw9ZQmzw_CJJusYgX3xqqJw-1 +MemberType : Direct +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleAssignmentOriginId : 4-PYiFWPHkqVOpuYmLiHaw9ZQmzw_CJJusYgX3xqqJw-1 +RoleAssignmentScheduleId : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +StartDateTime : 5/13/2022 8:14:33 AM +AdditionalProperties : {} ``` -{{ Add description here }} - +This examples get all created active role assignments for the specified user. diff --git a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentScheduleRequest.md b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentScheduleRequest.md index 093355d11d5..e84276646a1 100644 --- a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentScheduleRequest.md +++ b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleAssignmentScheduleRequest.md @@ -1,18 +1,65 @@ -### Example 1: {{ Add title here }} +### Example 1: Get all active role assignment requests + ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleAssignmentScheduleRequest | Format-List -{{ Add output here }} +Action : SelfActivate +ActivatedUsing : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleEligibilitySchedule +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +ApprovalId : +CompletedDateTime : 5/13/2022 8:14:32 AM +CreatedBy : Microsoft.Graph.PowerShell.Models.MicrosoftGraphIdentitySet +CreatedDateTime : 5/13/2022 8:14:32 AM +CustomData : +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +Id : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +IsValidationOnly : False +Justification : Activate assignment +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +ScheduleInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphRequestSchedule +Status : Provisioned +TargetSchedule : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleAssignmentSchedule +TargetScheduleId : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +TicketInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphTicketInfo +AdditionalProperties : {} ``` -{{ Add description here }} +This example gets all the active role assignment requests. + +### Example 2: Get all active role assignment requests for a user -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleAssignmentScheduleRequest -Filter "principalId eq '6c42590f-fcf0-4922-bac6-205f7c6aa89c'" | Format-List -{{ Add output here }} +Action : SelfActivate +ActivatedUsing : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleEligibilitySchedule +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +ApprovalId : +CompletedDateTime : 5/13/2022 8:14:32 AM +CreatedBy : Microsoft.Graph.PowerShell.Models.MicrosoftGraphIdentitySet +CreatedDateTime : 5/13/2022 8:14:32 AM +CustomData : +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +Id : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +IsValidationOnly : False +Justification : Activate assignment +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +ScheduleInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphRequestSchedule +Status : Provisioned +TargetSchedule : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleAssignmentSchedule +TargetScheduleId : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +TicketInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphTicketInfo +AdditionalProperties : {} ``` -{{ Add description here }} - +This example gets all the active role assignment requests for the specified user. diff --git a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilitySchedule.md b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilitySchedule.md index 093355d11d5..c9cfcc9f39f 100644 --- a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilitySchedule.md +++ b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilitySchedule.md @@ -1,18 +1,66 @@ -### Example 1: {{ Add title here }} +### Example 1: Get all eligibility schedules + ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleEligibilitySchedule | Format-List + +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +CreatedDateTime : 2/15/2022 3:11:22 PM +CreatedUsing : 78222acb-04d0-4f9f-9d5e-52fb75658d32 +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +Id : 78222acb-04d0-4f9f-9d5e-52fb75658d32 +MemberType : Direct +ModifiedDateTime : 1/1/0001 8:00:00 AM +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 50a2bbd7-302c-4572-b6b0-7c8cc0bce7b7 +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3 +ScheduleInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphRequestSchedule +Status : Provisioned +AdditionalProperties : {} -{{ Add output here }} +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +CreatedDateTime : 5/13/2022 7:39:08 AM +CreatedUsing : 8554c1e7-b359-41b9-802e-4beabddec142 +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +Id : 8554c1e7-b359-41b9-802e-4beabddec142 +MemberType : Direct +ModifiedDateTime : 1/1/0001 8:00:00 AM +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +ScheduleInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphRequestSchedule +Status : Provisioned +AdditionalProperties : {} ``` -{{ Add description here }} +This example returns all eligible role assignment schedules. This includes eligible roles that have been created and the future scheduled assignments. + +### Example 2: Get all eligibility schedules for specific user -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleEligibilitySchedule -Filter "principalId eq '6c42590f-fcf0-4922-bac6-205f7c6aa89c'" | Format-List -{{ Add output here }} +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +CreatedDateTime : 5/13/2022 7:39:08 AM +CreatedUsing : 8554c1e7-b359-41b9-802e-4beabddec142 +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +Id : 8554c1e7-b359-41b9-802e-4beabddec142 +MemberType : Direct +ModifiedDateTime : 1/1/0001 8:00:00 AM +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +ScheduleInfo : Microsoft.Graph.PowerShell.Models.MicrosoftGraphRequestSchedule +Status : Provisioned +AdditionalProperties : {} ``` -{{ Add description here }} - +This example returns all eligible role assignment schedules for the specified user. diff --git a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilityScheduleInstance.md b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilityScheduleInstance.md index 093355d11d5..9fd699b12ee 100644 --- a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilityScheduleInstance.md +++ b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilityScheduleInstance.md @@ -1,18 +1,60 @@ -### Example 1: {{ Add title here }} +### Example 1: Get all eligibility schedule instances + ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleEligibilityScheduleInstance | Format-List + +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +EndDateTime : 5/13/2022 5:39:07 PM +Id : 4-PYiFWPHkqVOpuYmLiHaw9ZQmzw_CJJusYgX3xqqJw-1-e +MemberType : Direct +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +RoleEligibilityScheduleId : 8554c1e7-b359-41b9-802e-4beabddec142 +StartDateTime : 5/13/2022 7:39:08 AM +AdditionalProperties : {} -{{ Add output here }} +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +EndDateTime : 5/16/2022 3:00:54 PM +Id : kl2Jm9Msx0SdAqasLV6lw9e7olAsMHJFtrB8jMC857c-1-e +MemberType : Direct +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 50a2bbd7-302c-4572-b6b0-7c8cc0bce7b7 +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3 +RoleEligibilityScheduleId : 78222acb-04d0-4f9f-9d5e-52fb75658d32 +StartDateTime : 2/15/2022 3:11:22 PM +AdditionalProperties : {} ``` -{{ Add description here }} +This examples get all created eligible role assignments. + +### Example 2: Get all eligibility schedule instances for a specific user -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleEligibilityScheduleInstance -Filter "principalId eq '6c42590f-fcf0-4922-bac6-205f7c6aa89c'" | Format-List -{{ Add output here }} +AppScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope +AppScopeId : +DirectoryScope : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +DirectoryScopeId : / +EndDateTime : 5/13/2022 5:39:07 PM +Id : 4-PYiFWPHkqVOpuYmLiHaw9ZQmzw_CJJusYgX3xqqJw-1-e +MemberType : Direct +Principal : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +RoleDefinition : Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +RoleEligibilityScheduleId : 8554c1e7-b359-41b9-802e-4beabddec142 +StartDateTime : 5/13/2022 7:39:08 AM +AdditionalProperties : {} ``` -{{ Add description here }} - +This example gets all the created eligible role assignments for the specified user. diff --git a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilityScheduleRequest.md b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilityScheduleRequest.md index 093355d11d5..1fef75bdd32 100644 --- a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilityScheduleRequest.md +++ b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/Get-MgRoleManagementDirectoryRoleEligibilityScheduleRequest.md @@ -1,18 +1,43 @@ -### Example 1: {{ Add title here }} +### Example 1: Get all role eligibility requests + ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleEligibilityScheduleRequest | + Format-List Id, Status, Action, AppScopeId, DirectoryScopeId, RoleDefinitionId, IsValidationOnly, Justification, PrincipalId, CompletedDateTime, CreatedDateTime, TargetScheduleID -{{ Add output here }} +Id : 8554c1e7-b359-41b9-802e-4beabddec142 +Status : Provisioned +Action : AdminAssign +AppScopeId : +DirectoryScopeId : / +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +IsValidationOnly : False +Justification : Add eligible assignment +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +CompletedDateTime : 5/13/2022 7:39:07 AM +CreatedDateTime : 5/13/2022 7:39:07 AM +TargetScheduleId : 8554c1e7-b359-41b9-802e-4beabddec142 ``` -{{ Add description here }} +This example gets all role eligibility requests. + +### Example 2: Get all role eligibility requests for a user -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgRoleManagementDirectoryRoleEligibilityScheduleRequest -Filter "principalId eq '6c42590f-fcf0-4922-bac6-205f7c6aa89c'" | + Format-List Id, Status, Action, AppScopeId, DirectoryScopeId, RoleDefinitionId, IsValidationOnly, Justification, PrincipalId, CompletedDateTime, CreatedDateTime, TargetScheduleID -{{ Add output here }} +Id : 1ab90e94-1e26-4ce2-be98-b8e848fed14d +Status : Provisioned +Action : AdminAssign +AppScopeId : +DirectoryScopeId : / +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +IsValidationOnly : False +Justification : Add eligible assignment +PrincipalId : d29e358a-a443-4d83-98b3-499a5405bb5b +CompletedDateTime : 3/22/2022 11:05:48 AM +CreatedDateTime : 3/22/2022 11:05:48 AM +TargetScheduleId : 1ab90e94-1e26-4ce2-be98-b8e848fed14d ``` -{{ Add description here }} - +This example gets all role eligibility requests for the specified user. diff --git a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest.md b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest.md index 093355d11d5..276c11cc5fb 100644 --- a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest.md +++ b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest.md @@ -1,18 +1,104 @@ -### Example 1: {{ Add title here }} +### Example 1: User activates an eligible role assignment + ```powershell -PS C:\> {{ Add code here }} +$params = @{ + "PrincipalId" = "6c42590f-fcf0-4922-bac6-205f7c6aa89c" + "RoleDefinitionId" = "88d8e3e3-8f55-4a1e-953a-9b9898b8876b" + "Justification" = "Activate assignment" + "DirectoryScopeId" = "/" + "Action" = "SelfActivate" + "ScheduleInfo" = @{ + "StartDateTime" = Get-Date + "Expiration" = @{ + "Type" = "AfterDuration" + "Duration" = "PT3H" + } + } + } + +New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest -BodyParameter $params | + Format-List Id, Status, Action, AppScopeId, DirectoryScopeId, RoleDefinitionID, IsValidationOnly, Justification, PrincipalId, CompletedDateTime, CreatedDateTime, TargetScheduleID + -{{ Add output here }} +Id : 76dd76bb-900f-470b-9bcc-1eb68bc45532 +Status : Provisioned +Action : SelfActivate +AppScopeId : +DirectoryScopeId : / +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +IsValidationOnly : False +Justification : Activate assignment +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +CompletedDateTime : 5/13/2022 8:14:32 AM +CreatedDateTime : 5/13/2022 8:14:30 AM +TargetScheduleId : 76dd76bb-900f-470b-9bcc-1eb68bc45532 ``` -{{ Add description here }} +In this example, the user activates an eligible role assignment for 3 hours. An active role assignment allows the user access to all permissions defined for that role for the defined duration. + +### Example 2: Admin creates an active role assignment -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$params = @{ + "PrincipalId" = "6c42590f-fcf0-4922-bac6-205f7c6aa89c" + "RoleDefinitionId" = "9360feb5-f418-4baa-8175-e2a00bac4301" + "Justification" = "Add active role assignment" + "DirectoryScopeId" = "/" + "Action" = "AdminAssign" + "ScheduleInfo" = @{ + "StartDateTime" = Get-Date + "Expiration" = @{ + "Type" = "AfterDuration" + "Duration" = "PT30H" + } + } + } + +New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest -BodyParameter $params | + Format-List Id, Status, Action, AppScopeId, DirectoryScopeId, RoleDefinitionID, IsValidationOnly, Justification, PrincipalId, CompletedDateTime, CreatedDateTime, TargetScheduleID -{{ Add output here }} +Id : 9e98256e-58af-4d02-89ce-5134e2fe5508 +Status : Provisioned +Action : AdminAssign +AppScopeId : +DirectoryScopeId : / +RoleDefinitionId : 9360feb5-f418-4baa-8175-e2a00bac4301 +IsValidationOnly : False +Justification : Add active role assignment +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +CompletedDateTime : 5/13/2022 8:33:37 AM +CreatedDateTime : 5/13/2022 8:33:36 AM +TargetScheduleId : 9e98256e-58af-4d02-89ce-5134e2fe5508 ``` -{{ Add description here }} +In this example, an admin creates an active role assignment for the specified user for the specified duration. + +### Example 3: User deactivates an active role assignment + +```powershell +$params = @{ + "PrincipalId" = "6c42590f-fcf0-4922-bac6-205f7c6aa89c" + "RoleDefinitionId" = "88d8e3e3-8f55-4a1e-953a-9b9898b8876b" + "Justification" = "Deactivate assignment" + "DirectoryScopeId" = "/" + "Action" = "SelfDeactivate" + } + +New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest -BodyParameter $params | + Format-List Id, Status, Action, AppScopeId, DirectoryScopeId, RoleDefinitionID, IsValidationOnly, Justification, PrincipalId, CompletedDateTime, CreatedDateTime, TargetScheduleID + +Id : 2ce935eb-633d-47ee-8dd1-bffc48a79e53 +Status : Revoked +Action : SelfDeactivate +AppScopeId : +DirectoryScopeId : / +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +IsValidationOnly : False +Justification : Deactivate assignment +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +CompletedDateTime : +CreatedDateTime : 5/13/2022 9:27:09 AM +TargetScheduleId : +``` +In this example, the user deactivates an active role assignment. They will no longer have access to the permissions defined for that role. diff --git a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest.md b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest.md index 093355d11d5..365de278952 100644 --- a/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest.md +++ b/src/DeviceManagement.Enrolment/DeviceManagement.Enrolment/examples/v1.0-beta/New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest.md @@ -1,18 +1,101 @@ -### Example 1: {{ Add title here }} +### Example 1: Create an eligible role assignment + ```powershell -PS C:\> {{ Add code here }} +$params = @{ + "PrincipalId" = "6c42590f-fcf0-4922-bac6-205f7c6aa89c" + "RoleDefinitionId" = "88d8e3e3-8f55-4a1e-953a-9b9898b8876b" + "Justification" = "Add eligible assignment" + "DirectoryScopeId" = "/" + "Action" = "AdminAssign" + "ScheduleInfo" = @{ + "StartDateTime" = Get-Date + "Expiration" = @{ + "Type" = "AfterDuration" + "Duration" = "PT10H" + } + } + } + +New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest -BodyParameter $params | + Format-List Id, Status, Action, AppScopeId, DirectoryScopeId, RoleDefinitionId, IsValidationOnly, Justification, PrincipalId, CompletedDateTime, CreatedDateTime -{{ Add output here }} +Id : 8554c1e7-b359-41b9-802e-4beabddec142 +Status : Provisioned +Action : AdminAssign +AppScopeId : +DirectoryScopeId : / +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +IsValidationOnly : False +Justification : Add eligible assignment +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +CompletedDateTime : 5/13/2022 7:39:07 AM +CreatedDateTime : 5/13/2022 7:39:05 AM ``` -{{ Add description here }} +This example creates an eligible role assignment for user **6c42590f-fcf0-4922-bac6-205f7c6aa89c** for 10 hours for the specified role. An eligible role doesn't give a user access to the permissions defined for the role. It can potentially be activated to allow the user access to those permissions. + +### Example 2: Extend an eligible role assignment -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$params = @{ + "PrincipalId" = "6c42590f-fcf0-4922-bac6-205f7c6aa89c" + "RoleDefinitionId" = "88d8e3e3-8f55-4a1e-953a-9b9898b8876b" + "Justification" = "Extend eligible assignment" + "DirectoryScopeId" = "/" + "Action" = "AdminExtend" + "ScheduleInfo" = @{ + "StartDateTime" = Get-Date + "Expiration" = @{ + "Type" = "AfterDateTime" + "EndDateTime" = (Get-Date).AddDays(5) + } + } +} -{{ Add output here }} +New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest -BodyParameter $params | + Format-List Id, Status, Action, AppScopeId, DirectoryScopeId, RoleDefinitionId, IsValidationOnly, Justification, PrincipalId, CompletedDateTime, CreatedDateTime + +Id : 8b91032b-8172-4096-92c3-d91d2e446c2d +Status : Provisioned +Action : AdminExtend +AppScopeId : +DirectoryScopeId : / +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +IsValidationOnly : False +Justification : Extend eligible assignment +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +CompletedDateTime : 5/13/2022 8:00:22 AM +CreatedDateTime : 5/13/2022 8:00:19 AM ``` -{{ Add description here }} +This example extends an eligible role assignment for user **6c42590f-fcf0-4922-bac6-205f7c6aa89c** to 5 days. + +### Example 3: Remove an eligible role assignment + +```powershell +$params = @{ + "PrincipalId" = "6c42590f-fcf0-4922-bac6-205f7c6aa89c" + "RoleDefinitionId" = "88d8e3e3-8f55-4a1e-953a-9b9898b8876b" + "Justification" = "Remove eligible assignment" + "DirectoryScopeId" = "/" + "Action" = "AdminRemove" +} + +New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest -BodyParameter $params | + Format-List Id, Status, Action, AppScopeId, DirectoryScopeId, RoleDefinitionID, IsValidationOnly, Justification, PrincipalId, CompletedDateTime, CreatedDateTime, TargetScheduleID + +Id : 5e30aede-ba5e-4182-9dd0-5b2141dd7520 +Status : Revoked +Action : AdminRemove +AppScopeId : +DirectoryScopeId : / +RoleDefinitionId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b +IsValidationOnly : False +Justification : Remove eligible assignment +PrincipalId : 6c42590f-fcf0-4922-bac6-205f7c6aa89c +CompletedDateTime : +CreatedDateTime : 5/13/2022 9:31:14 AM +TargetScheduleId : +``` +This example removes an eligible role assignment for user **6c42590f-fcf0-4922-bac6-205f7c6aa89c**.