Skip to content

Commit 5f0dd4c

Browse files
authored
Update replace-an-expiring-client-secret-in-a-sharepoint-add-in.md
1 parent 21ae0e0 commit 5f0dd4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/sp-add-ins/replace-an-expiring-client-secret-in-a-sharepoint-add-in.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ Ensure the following before you begin:
4141
- From the remainder, it filters out non-SharePoint add-ins and add-ins that use asymmetric keys, such as workflows.
4242

4343
```powershell
44-
$applist = Get-MsolServicePrincipal -all |Where-Object -FilterScript { ($_.DisplayName -notlike "*Microsoft*") -and ($_.DisplayName -notlike "autohost*") -and ($_.ServicePrincipalNames -notlike "*localhost*") }
44+
$applist = Get-MsolServicePrincipal -all |Where-Object -FilterScript { ($_.DisplayName -notlike "*Microsoft*") -and ($_.DisplayName -notlike "autohost*") -and ($_.ServicePrincipalNames -notlike "*localhost*") }
4545
46-
foreach ($appentry in $applist) {
47-
$principalId = $appentry.AppPrincipalId
48-
$principalName = $appentry.DisplayName
46+
foreach ($appentry in $applist) {
47+
$principalId = $appentry.AppPrincipalId
48+
$principalName = $appentry.DisplayName
4949
5050
Get-MsolServicePrincipalCredential -AppPrincipalId $principalId -ReturnKeyValues $false | ? { $_.Type -eq "Password" } | % { "$principalName;$principalId;" + $_.KeyId.ToString() +";" + $_.StartDate.ToString() + ";" + $_.EndDate.ToString() } | out-file -FilePath c:\temp\appsec.txt -append
5151
}

0 commit comments

Comments
 (0)