File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
src/Authentication/Authentication/Models Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -103,5 +103,9 @@ public class GraphPermission
103103 /// Full deescription of the permission.
104104 /// </summary>
105105 public string FullDescription { get ; set ; }
106+ /// <summary>
107+ /// Least privilege flag shows whether the permission is the least privilege.
108+ /// </summary>
109+ public bool IsLeastPrivilege { get ; set ; }
106110 }
107111}
Original file line number Diff line number Diff line change @@ -102,9 +102,15 @@ $ApiVersion | ForEach-Object {
102102 Description = $_.consentDisplayName
103103 FullDescription = $_.consentDescription
104104 IsAdmin = $_.IsAdmin
105+ ScopeType = $_.ScopeType
106+ IsLeastPrivilege = $_.isLeastPrivilege
105107 }
106108 }
107- $MappingValue.Permissions = ($Permissions | Sort-Object - Property Name - Unique)
109+ $Permissions = $Permissions | Sort-Object - Property Name - Unique
110+ $Permissions = $Permissions | Sort-Object - Property ScopeType
111+ $Permissions = $Permissions | Sort-Object - Property IsLeastPrivilege
112+ [array ]::Reverse($Permissions )
113+ $MappingValue.Permissions = $Permissions
108114 }
109115 catch {
110116 Write-Warning " Failed to fetch permissions: $ ( $PermissionsUrl ) ?requesturl=$ ( $MappingValue.Uri ) &method=$ ( $MappingValue.Method ) "
You can’t perform that action at this time.
0 commit comments