File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
src/Authentication/Authentication/custom Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -224,3 +224,32 @@ function Find-MgGraphPermission {
224
224
end {
225
225
}
226
226
}
227
+
228
+ $scriptblock = {
229
+ param ($commandName ,
230
+ $parameterName ,
231
+ $wordToComplete ,
232
+ $commandAst ,
233
+ $fakeBoundParameters
234
+ )
235
+
236
+ $permissions = @ ()
237
+ $permissionsData = Permissions_GetPermissionsData
238
+ $permissionsOAuthQuery = Permissions_GetOauthData $permissionsData
239
+ $permissionsAppRolesQuery = Permissions_GetAppRolesData $permissionsData
240
+ $permissions += $permissionsOAuthQuery.Name
241
+ $permissions += $permissionsAppRolesQuery.Name
242
+ $permissions | Where-Object {
243
+ $_ -like " $wordToComplete *"
244
+ } | ForEach-Object {
245
+ $_
246
+ }
247
+ }
248
+
249
+ $params = @ {
250
+ CommandName = ' Find-MgGraphPermission'
251
+ ParameterName = ' SearchString'
252
+ ScriptBlock = $scriptBlock
253
+ }
254
+
255
+ Register-ArgumentCompleter @params
You can’t perform that action at this time.
0 commit comments