File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
src/Authentication/Authentication/custom Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -223,4 +223,4 @@ function Find-MgGraphPermission {
223
223
224
224
end {
225
225
}
226
- }
226
+ }
Original file line number Diff line number Diff line change
1
+ # ------------------------------------------------------------------------------
2
+ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3
+ # ------------------------------------------------------------------------------
4
+
5
+ Set-StrictMode - Version 2
6
+
7
+ . " $psscriptroot /common/Permissions.ps1"
8
+
9
+ $scopesParameterBlock = {
10
+ param ($commandName ,
11
+ $parameterName ,
12
+ $wordToComplete ,
13
+ $commandAst ,
14
+ $fakeBoundParameters
15
+ )
16
+
17
+ $permissions = @ ()
18
+ $permissionsOAuthQuery = Permissions_GetOauthData (Permissions_GetPermissionsData)
19
+ $permissions += $permissionsOAuthQuery.Name
20
+ $permissions | Where-Object {
21
+ $_ -like " $wordToComplete *"
22
+ }
23
+ }
24
+
25
+ Register-ArgumentCompleter - CommandName Connect-MgGraph - ParameterName Scopes - ScriptBlock $scopesParameterBlock
You can’t perform that action at this time.
0 commit comments