cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
crsnt
Advocate III
Advocate III

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
v-yuxima-msft
Community Support
Community Support

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

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

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,441)