cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

SharePoint customized powerapps form - expired list subscriptions growing but not deleted

Hi,

I noticed on my SharePoint list using customized form (PowerApps), that when I refresh the page and open the form (clicking New for example), SharePoint list subscriptions keep getting new entries and it expires old entry but not deleted.

This means the SP list subscriptions will grow quickly with a lot of expired subscriptions. Once it hits the max limit (100) then it will stop other things to be published e.g. workflows.

<entry>
    <id>https://<sites>/_api/Microsoft.SharePoint.Webhooks.Subscriptione800e555-be50-4409-82ec-bf7a68a03d64</id>
    <category term="Microsoft.SharePoint.Webhooks.Subscription" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
    <link rel="edit" href="Microsoft.SharePoint.Webhooks.Subscriptione800e555-be50-4409-82ec-bf7a68a03d64"/>
    <title/>
    <updated>2019-07-22T01:17:30Z</updated>
    <author>
      <name/>
    </author>
    <content type="application/xml">
      <m:properties>
        <d:clientState/>
        <d:expirationDateTime m:type="Edm.DateTime">2019-07-22T00:52:22.261Z</d:expirationDateTime>
        <d:id m:type="Edm.Guid">7c1ba8e0-6149-401a-8feb-4fb9f3279f08</d:id>
        <d:notificationUrl>https://1-australiasoutheast1.pushp.svc.ms/notifications?token=w0-469df603-4637-4059-8d4b-6b4182de729a</d:notificationUrl>
        <d:resource>c9fa0a03-6bad-4d3e-9c93-0a3d68d0fb98</d:resource>
        <d:resourceData m:null="true"/>
      </m:properties>
    </content>
  </entry>

Is this a bug?

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: SharePoint customized powerapps form - expired list subscriptions growing but not deleted

Hi @crsnt 

 

How do you create your customized form?

Do you create as this?

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/customize-list-form

I test on my side and can't reproduce the issue.

Could you try to clear cache and cookies or change other browsers to test?

Or could you please test with another list, is there the same issue?

 

Best Regards.

Yumia

Highlighted
Advocate II
Advocate II

Re: SharePoint customized powerapps form - expired list subscriptions growing but not deleted

Yes I'm doing it through SP list -> PowerApps -> Customize form.
Below is the script that helps identifying how many expired subscriptions for a list. If I make modifications here and there, the result keeps growing. I then have to remove them.

 <#
.SYNOPSIS
    Remove expired webhooks from SharePoint list
.NOTES
    user must authenticate with SharePoint before running this script. See site in .LINKS for instructions
.LINKS
    https://github.com/SharePoint/PnP-PowerShell/wiki/How-to-use-the-Windows-Credential-Manager-to-ease-authentication-with-PnP-PowerShell
#>
 
 param (
    [string]$siteurl = "<site>",
    [string]$listName = "<listname>"
 )

$subscriptionsCount = 0
$expiredSubscriptionsCount = 0
$today = (Get-Date).ToUniversalTime()

Connect-PnPOnline –Url $siteurl

$subscriptions = Get-PnPWebhookSubscriptions -List $listName

foreach($subscription in $subscriptions) 
{
    if ((Get-Date $subscription.ExpirationDateTime) -lt $today) 
    {
        Write-Host "Deleting subscription with expiration date:" $subscription.ExpirationDateTime

        #Remove-PnPWebhookSubscription -List $listName -Identity $subscription.Id -Force

        $expiredSubscriptionsCount++
    }

    $subscriptionsCount++
}

Write-Host "Subscriptions count: " $subscriptionsCount
Write-Host "Expired subscriptions count: " $expiredSubscriptionsCount
Highlighted
Advocate II
Advocate II

Re: SharePoint customized powerapps form - expired list subscriptions growing but not deleted

FYI. 
- Deleted expired subscriptions again
- Click New on the list, I can see active subscriptions count increased.

- Changed one of my SP views, added column, then removed column
- Now I see some expired subscriptions again.

I will try customising other list in powerapps now.
EDIT:
@v-yuxima-msft confirmed. I customised my other list, then I ran my powershell:

Deleting subscription with expiration date: 5/08/2019 5:10:25 AM
Deleting subscription with expiration date: 5/08/2019 6:53:14 AM
Deleting subscription with expiration date: 5/08/2019 11:39:22 PM
Deleting subscription with expiration date: 7/08/2019 8:15:36 AM
Deleting subscription with expiration date: 7/08/2019 8:16:01 AM
Subscriptions count: 7
Expired subscriptions count: 5

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,366)