diff --git a/src/Authentication/Authentication/Microsoft.Graph.Authentication-help.xml b/src/Authentication/Authentication/Microsoft.Graph.Authentication-help.xml index f0c1d0a2c0e..3c8bd5db0d1 100644 --- a/src/Authentication/Authentication/Microsoft.Graph.Authentication-help.xml +++ b/src/Authentication/Authentication/Microsoft.Graph.Authentication-help.xml @@ -1,4 +1,4 @@ - + @@ -18,7 +18,7 @@ ApiVersion - {{ Fill ApiVersion Description }} + The service API version. String @@ -30,7 +30,7 @@ Command - {{ Fill Command Description }} + The name of a command. e.g., Get-MgUser.} String[] @@ -39,13 +39,25 @@ None + + ProgressAction + + Treat this as a common parameter. + + ActionPreference + + ActionPreference + + + None + Find-MgGraphCommand InputObject - {{ Fill InputObject Description }} + Pipeline input object Object[] @@ -57,7 +69,7 @@ ApiVersion - {{ Fill ApiVersion Description }} + The service API version. String @@ -66,13 +78,25 @@ None + + ProgressAction + + Treat this as a common parameter. + + ActionPreference + + ActionPreference + + + None + Find-MgGraphCommand Uri - {{ Fill Uri Description }} + The API path a command calls. e.g., /users. String[] @@ -84,7 +108,7 @@ ApiVersion - {{ Fill ApiVersion Description }} + The service API version. String @@ -96,7 +120,7 @@ Method - {{ Fill Method Description }} + The HTTP method a command makes. String @@ -105,13 +129,25 @@ None + + ProgressAction + + Treat this as a common parameter. + + ActionPreference + + ActionPreference + + + None + ApiVersion - {{ Fill ApiVersion Description }} + The service API version. String @@ -123,7 +159,7 @@ Command - {{ Fill Command Description }} + The name of a command. e.g., Get-MgUser.} String[] @@ -135,7 +171,7 @@ InputObject - {{ Fill InputObject Description }} + Pipeline input object Object[] @@ -147,7 +183,7 @@ Method - {{ Fill Method Description }} + The HTTP method a command makes. String @@ -156,10 +192,22 @@ None + + ProgressAction + + Treat this as a common parameter. + + ActionPreference + + ActionPreference + + + None + Uri - {{ Fill Uri Description }} + The API path a command calls. e.g., /users. String[] @@ -371,7 +419,8 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users All - {{ Fill All Description }} + To return all possible permissions rather than just those that match the SearchString parameter, specify the All parameter. The +All parameter may also be used with the PermissionType to enumerate all applicaition permissions or all delegated permissions. SwitchParameter @@ -382,7 +431,14 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users Online - {{ Fill Online Description }} + Specify the Online parameter in addition to SearchString to force Find-MgGraphPermission to update its set of permissions +by requesting the latest permissions data from Microsoft Graph itself before searching for the permissions specified the +SearchString parameter. This ensures that Find-MgGraphPermission returns the most accurate search results as new permissions +are added to Microsoft Graph for new APIs. The command uses the existing access to Microsoft Graph as enabled by a previous +invocation of the Connect-MgGraph command to issue the request for updated permissions. If your current connection does not +already have access to read this data from Microsoft Graph or if there is no network connectivity to Microsoft Graph, the command will fail. +If the command is successful in updating the set of permissions prior to searching for permissions, Find-MgGraphPermission will +continue to use the updated list for all future invocations of the command even if they do not specify the Online parameter SwitchParameter @@ -393,7 +449,9 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users PermissionType - {{ Fill PermissionType Description }} + Specify the PermissionType to determine whether application permissions, delegated permisisons, or both are returned by +Find-MgGraphPermission. By default, the value of this parameter is Any, which includes both delegated and application permissions. +Other valid values for PermissionType are Application and Delegated to return those specify types of permissions. String @@ -402,13 +460,28 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users None + + ProgressAction + + Treat this as a common parameter. + + ActionPreference + + ActionPreference + + + None + Find-MgGraphPermission SearchString - {{ Fill SearchString Description }} + The SearchString parameter allows you to specify a string such as 'user' or 'mail' that represents the subject or domain +of the permission you're searching for. Since permissions usually have names such as 'User.Read' or 'Mail.ReadWrite', the +command uses the SearchString parameter to return all permissions that contain the value specified for SearchString in the +name of the permission. String @@ -420,7 +493,7 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users ExactMatch - {{ Fill ExactMatch Description }} + Specify the ExactMatch parameter to restrict the permissions emitted to those that exactly match the value specified for SearchString. SwitchParameter @@ -431,7 +504,14 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users Online - {{ Fill Online Description }} + Specify the Online parameter in addition to SearchString to force Find-MgGraphPermission to update its set of permissions +by requesting the latest permissions data from Microsoft Graph itself before searching for the permissions specified the +SearchString parameter. This ensures that Find-MgGraphPermission returns the most accurate search results as new permissions +are added to Microsoft Graph for new APIs. The command uses the existing access to Microsoft Graph as enabled by a previous +invocation of the Connect-MgGraph command to issue the request for updated permissions. If your current connection does not +already have access to read this data from Microsoft Graph or if there is no network connectivity to Microsoft Graph, the command will fail. +If the command is successful in updating the set of permissions prior to searching for permissions, Find-MgGraphPermission will +continue to use the updated list for all future invocations of the command even if they do not specify the Online parameter SwitchParameter @@ -442,7 +522,9 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users PermissionType - {{ Fill PermissionType Description }} + Specify the PermissionType to determine whether application permissions, delegated permisisons, or both are returned by +Find-MgGraphPermission. By default, the value of this parameter is Any, which includes both delegated and application permissions. +Other valid values for PermissionType are Application and Delegated to return those specify types of permissions. String @@ -451,13 +533,26 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users None + + ProgressAction + + Treat this as a common parameter. + + ActionPreference + + ActionPreference + + + None + All - {{ Fill All Description }} + To return all possible permissions rather than just those that match the SearchString parameter, specify the All parameter. The +All parameter may also be used with the PermissionType to enumerate all applicaition permissions or all delegated permissions. SwitchParameter @@ -469,7 +564,7 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users ExactMatch - {{ Fill ExactMatch Description }} + Specify the ExactMatch parameter to restrict the permissions emitted to those that exactly match the value specified for SearchString. SwitchParameter @@ -481,7 +576,14 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users Online - {{ Fill Online Description }} + Specify the Online parameter in addition to SearchString to force Find-MgGraphPermission to update its set of permissions +by requesting the latest permissions data from Microsoft Graph itself before searching for the permissions specified the +SearchString parameter. This ensures that Find-MgGraphPermission returns the most accurate search results as new permissions +are added to Microsoft Graph for new APIs. The command uses the existing access to Microsoft Graph as enabled by a previous +invocation of the Connect-MgGraph command to issue the request for updated permissions. If your current connection does not +already have access to read this data from Microsoft Graph or if there is no network connectivity to Microsoft Graph, the command will fail. +If the command is successful in updating the set of permissions prior to searching for permissions, Find-MgGraphPermission will +continue to use the updated list for all future invocations of the command even if they do not specify the Online parameter SwitchParameter @@ -493,7 +595,9 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users PermissionType - {{ Fill PermissionType Description }} + Specify the PermissionType to determine whether application permissions, delegated permisisons, or both are returned by +Find-MgGraphPermission. By default, the value of this parameter is Any, which includes both delegated and application permissions. +Other valid values for PermissionType are Application and Delegated to return those specify types of permissions. String @@ -502,10 +606,25 @@ Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users None + + ProgressAction + + Treat this as a common parameter. + + ActionPreference + + ActionPreference + + + None + SearchString - {{ Fill SearchString Description }} + The SearchString parameter allows you to specify a string such as 'user' or 'mail' that represents the subject or domain +of the permission you're searching for. Since permissions usually have names such as 'User.Read' or 'Mail.ReadWrite', the +command uses the SearchString parameter to return all permissions that contain the value specified for SearchString in the +name of the permission. String @@ -661,4 +780,4 @@ Description : Allows the app to read all applications and service principals - \ No newline at end of file + diff --git a/src/Authentication/Authentication/build-module.ps1 b/src/Authentication/Authentication/build-module.ps1 index 3e265cc310e..44d580f4009 100644 --- a/src/Authentication/Authentication/build-module.ps1 +++ b/src/Authentication/Authentication/build-module.ps1 @@ -108,6 +108,49 @@ Write-Host -ForegroundColor Green 'Creating new xml based help file ...' $DocsPath = (Join-Path $PSScriptRoot "../docs/") New-ExternalHelp -Path $DocsPath -OutputPath $PSScriptRoot -Force +# Update markdown xml by replacing place holders with actual descriptions for script based cmdlets. + +# Place holder values for Find-MgGraphPermission +$SearchStringDescription = "The SearchString parameter allows you to specify a string such as 'user' or 'mail' that represents the subject or domain +of the permission you're searching for. Since permissions usually have names such as 'User.Read' or 'Mail.ReadWrite', the +command uses the SearchString parameter to return all permissions that contain the value specified for SearchString in the +name of the permission." + +$ExactMatchDescription = "Specify the ExactMatch parameter to restrict the permissions emitted to those that exactly match the value specified for SearchString." + +$PermissionTypeDescription = "Specify the PermissionType to determine whether application permissions, delegated permisisons, or both are returned by +Find-MgGraphPermission. By default, the value of this parameter is Any, which includes both delegated and application permissions. +Other valid values for PermissionType are Application and Delegated to return those specify types of permissions." + +$OnlineDescription = "Specify the Online parameter in addition to SearchString to force Find-MgGraphPermission to update its set of permissions +by requesting the latest permissions data from Microsoft Graph itself before searching for the permissions specified the +SearchString parameter. This ensures that Find-MgGraphPermission returns the most accurate search results as new permissions +are added to Microsoft Graph for new APIs. The command uses the existing access to Microsoft Graph as enabled by a previous +invocation of the Connect-MgGraph command to issue the request for updated permissions. If your current connection does not +already have access to read this data from Microsoft Graph or if there is no network connectivity to Microsoft Graph, the command will fail. +If the command is successful in updating the set of permissions prior to searching for permissions, Find-MgGraphPermission will +continue to use the updated list for all future invocations of the command even if they do not specify the Online parameter" + +$AllParameterDescription = "To return all possible permissions rather than just those that match the SearchString parameter, specify the All parameter. The +All parameter may also be used with the PermissionType to enumerate all applicaition permissions or all delegated permissions." + +# Place holder values for Find-MgGraphCommand +$UriDescription = "The API path a command calls. e.g., /users." + +$MethodDescription = "The HTTP method a command makes." + +$ApiVersionDescription = "The service API version." + +$CommandDescription = "The name of a command. e.g., Get-MgUser." + +# Update maml file by replacing place holders with actual value. +(Get-Content "$cmdletsSrc/$ModulePrefix.$ModuleName-Help.xml") -replace "{{ Fill ApiVersion Description }}", $ApiVersionDescription -replace "{{ Fill Command Description }", $CommandDescription -replace "{{ Fill InputObject Description }}", "Pipeline input object" -replace "{{ Fill Uri Description }}", $UriDescription -replace "{{ Fill Method Description }}", $MethodDescription -replace "{{ Fill Command Description }}", $CommandDescription -replace "{{ Fill All Description }}", $AllParameterDescription -replace "{{ Fill Online Description }}", $OnlineDescription -replace "{{ Fill PermissionType Description }}", $PermissionTypeDescription -replace "{{ Fill SearchString Description }}", $SearchStringDescription -replace "{{ Fill ExactMatch Description }}", $ExactMatchDescription -replace "{{ Fill ProgressAction Description }}", "Treat this as a common parameter." | Set-Content "$cmdletsSrc/$ModulePrefix.$ModuleName-Help.xml" + +# Update Find-MgGraphPermission markdown file by replacing place holders with actual value. +(Get-Content "$DocsPath/Find-MgGraphPermission.md") -replace "{{ Fill All Description }}", $AllParameterDescription -replace "{{ Fill Online Description }}", $OnlineDescription -replace "{{ Fill PermissionType Description }}", $PermissionTypeDescription -replace "{{ Fill SearchString Description }}", $SearchStringDescription -replace "{{ Fill ExactMatch Description }}", $ExactMatchDescription -replace "{{ Fill ProgressAction Description }}", "Treat this as a common parameter." | Set-Content "$DocsPath/Find-MgGraphPermission.md" + +# Update Find-MgGraphCommand markdown file by replacing place holders with actual value. +(Get-Content "$DocsPath/Find-MgGraphCommand.md") -replace "{{ Fill ApiVersion Description }}", $ApiVersionDescription -replace "{{ Fill Command Description }", $CommandDescription -replace "{{ Fill InputObject Description }}", "Pipeline input object" -replace "{{ Fill Uri Description }}", $UriDescription -replace "{{ Fill Method Description }}", $MethodDescription -replace "{{ Fill Command Description }}", $CommandDescription -replace "{{ Fill ProgressAction Description }}", "Treat this as a common parameter."| Set-Content "$DocsPath/Find-MgGraphCommand.md" # Copy manifest. Copy-Item -Path "$cmdletsSrc/$ModulePrefix.$ModuleName.format.ps1xml" -Destination $outDir Copy-Item -Path "$cmdletsSrc/$ModulePrefix.$ModuleName.psm1" -Destination $outDir diff --git a/src/Authentication/docs/Find-MgGraphCommand.md b/src/Authentication/docs/Find-MgGraphCommand.md index a7f3f9ed132..f905c6ce7ab 100644 --- a/src/Authentication/docs/Find-MgGraphCommand.md +++ b/src/Authentication/docs/Find-MgGraphCommand.md @@ -1,4 +1,4 @@ ---- +--- external help file: Microsoft.Graph.Authentication-help.xml Module Name: Microsoft.Graph.Authentication online version: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.authentication/find-mggraphcommand @@ -14,17 +14,20 @@ Find-MgGraphCommand aims to make it easier for you to discover which API path a ### FindByCommandOrUri (Default) ``` -Find-MgGraphCommand [-ApiVersion ] [-InputObject] [] +Find-MgGraphCommand [-ApiVersion ] [-InputObject] [-ProgressAction ] + [] ``` ### FindByUri ``` -Find-MgGraphCommand [-Uri] [-Method ] [-ApiVersion ] [] +Find-MgGraphCommand [-Uri] [-Method ] [-ApiVersion ] + [-ProgressAction ] [] ``` ### FindByCommand ``` -Find-MgGraphCommand [-ApiVersion ] -Command [] +Find-MgGraphCommand [-ApiVersion ] -Command [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -129,7 +132,7 @@ Searches for commands using URI wildcard. ## PARAMETERS ### -ApiVersion -{{ Fill ApiVersion Description }} +The service API version. ```yaml Type: String @@ -144,7 +147,7 @@ Accept wildcard characters: False ``` ### -Command -{{ Fill Command Description }} +The name of a command. e.g., Get-MgUser.} ```yaml Type: String[] @@ -159,7 +162,7 @@ Accept wildcard characters: False ``` ### -InputObject -{{ Fill InputObject Description }} +Pipeline input object ```yaml Type: Object[] @@ -174,7 +177,7 @@ Accept wildcard characters: False ``` ### -Method -{{ Fill Method Description }} +The HTTP method a command makes. ```yaml Type: String @@ -188,8 +191,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +Treat this as a common parameter. + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Uri -{{ Fill Uri Description }} +The API path a command calls. e.g., /users. ```yaml Type: String[] diff --git a/src/Authentication/docs/Find-MgGraphPermission.md b/src/Authentication/docs/Find-MgGraphPermission.md index 9eef6363bf8..8e33e492d81 100644 --- a/src/Authentication/docs/Find-MgGraphPermission.md +++ b/src/Authentication/docs/Find-MgGraphPermission.md @@ -1,4 +1,4 @@ ---- +--- external help file: Microsoft.Graph.Authentication-help.xml Module Name: Microsoft.Graph.Authentication online version: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.authentication/find-mggraphpermission @@ -15,12 +15,13 @@ The Microsoft Graph PowerShell SDK application requires users to have domain kno ### Search ``` Find-MgGraphPermission [-SearchString] [-ExactMatch] [-PermissionType ] [-Online] - [] + [-ProgressAction ] [] ``` ### All ``` -Find-MgGraphPermission [-PermissionType ] [-Online] [-All] [] +Find-MgGraphPermission [-PermissionType ] [-Online] [-All] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -79,7 +80,8 @@ Retrieves identifier for a specific permission. ## PARAMETERS ### -All -{{ Fill All Description }} +To return all possible permissions rather than just those that match the SearchString parameter, specify the All parameter. The +All parameter may also be used with the PermissionType to enumerate all applicaition permissions or all delegated permissions. ```yaml Type: SwitchParameter @@ -94,7 +96,7 @@ Accept wildcard characters: False ``` ### -ExactMatch -{{ Fill ExactMatch Description }} +Specify the ExactMatch parameter to restrict the permissions emitted to those that exactly match the value specified for SearchString. ```yaml Type: SwitchParameter @@ -109,7 +111,14 @@ Accept wildcard characters: False ``` ### -Online -{{ Fill Online Description }} +Specify the Online parameter in addition to SearchString to force Find-MgGraphPermission to update its set of permissions +by requesting the latest permissions data from Microsoft Graph itself before searching for the permissions specified the +SearchString parameter. This ensures that Find-MgGraphPermission returns the most accurate search results as new permissions +are added to Microsoft Graph for new APIs. The command uses the existing access to Microsoft Graph as enabled by a previous +invocation of the Connect-MgGraph command to issue the request for updated permissions. If your current connection does not +already have access to read this data from Microsoft Graph or if there is no network connectivity to Microsoft Graph, the command will fail. +If the command is successful in updating the set of permissions prior to searching for permissions, Find-MgGraphPermission will +continue to use the updated list for all future invocations of the command even if they do not specify the Online parameter ```yaml Type: SwitchParameter @@ -124,7 +133,9 @@ Accept wildcard characters: False ``` ### -PermissionType -{{ Fill PermissionType Description }} +Specify the PermissionType to determine whether application permissions, delegated permisisons, or both are returned by +Find-MgGraphPermission. By default, the value of this parameter is Any, which includes both delegated and application permissions. +Other valid values for PermissionType are Application and Delegated to return those specify types of permissions. ```yaml Type: String @@ -138,8 +149,26 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +Treat this as a common parameter. + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SearchString -{{ Fill SearchString Description }} +The SearchString parameter allows you to specify a string such as 'user' or 'mail' that represents the subject or domain +of the permission you're searching for. Since permissions usually have names such as 'User.Read' or 'Mail.ReadWrite', the +command uses the SearchString parameter to return all permissions that contain the value specified for SearchString in the +name of the permission. ```yaml Type: String