Skip to main content

Posts

SharePoint Framework Web Part Properties

Hi,

I have created examples for SharePoint Framework Web Part Property Field examples. Here I have covered almost all the properties & functions for each field.

You can download examples from Github :


SPFxButtonSPFxCheckboxSPFxChoiceGroupSPFxDropdownSPFxGroupsSPFxHeadersSPFxHorizontalRuleSPFxLabelSPFxLinkSPFxMultiLineTextboxSPFxPagesSPFxSliderSPFxTextbox
Recent posts

Map users in SharePoint Migration Tool with File Share option

Update existing site column properties with CSOM

Hi,

Some time we want to update existing Site Column. Reason may be any thing i.e. I want to add more choices in Choice list & want to set default choice value as well.

This is very easy in CSOM.

Here is my default xml from existing site column :

<Field Type="Choice" DisplayName="Office Location"
    Required="FALSE" EnforceUniqueValues="FALSE"
    Indexed="FALSE" Format="Dropdown"
    FillInChoice="FALSE" Group="CustomColumns"
    ID="{e57a1e08-f062-4b3c-9dc1-47ee2d0805b0}"
    SourceID="{ad0c8572-a4b6-40c3-a359-d282eae885ce}"
    StaticName="OfficeLocation" Name="OfficeLocation"
    Version="2" CustomFormatter="">
        <Default>Main Location</Default>
        <CHOICES>
            <CHOICE>Main Location</CHOICE>
            <CHOICE>Head Quarter</CHOICE>
            <CHOICE>Branch</CHOICE>
 …

The requested service, 'http://my-sp2016:32843/guid/AppMng.svc' could not be activated. See the server's diagnostic trace logs for more information

Hi ,

I was trying to add my custom apps in the SharePoint 2016 but it was throwing me this error :

The requested service, 'http://my-sp2016:32843/guid/AppMng.svc' could not be activated. See the server's diagnostic trace logs for more information

I have investigated & found the reason.

Reason is more then 90% memory is consumed by SharePoint

Solution is just kill some process which are taking unnecessary memories. To kill the unwanted processes , open task manager and select the process which is not useful then hit end task button.

Generate & Replace an expiring client secret in a SharePoint Add-in

Hi,

I have created a provider hosted app for SharePoint. It got expired due to validity of secrete because usually client secret validity is one year. Now the app started throwing exception to me i.e. ""Invalid JWT token. Could not resolve issuer token."

I did couple of research on it & found the solution from site "https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/replace-an-expiring-client-secret-in-a-sharepoint-add-in".

I have made some changes in this script to make little bit easier to use .

Here is the script :

#Actual Article
#https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/replace-an-expiring-client-secret-in-a-sharepoint-add-in

#MSOnline
#Get help from : https://www.powershellgallery.com/packages/MSOnline/1.1.166.0
#Inspect
#PS> Save-Module -Name MSOnline -Path <path>
#Install
#PS> Install-Module -Name MSOnline

cls
#Get app details
Connect-MsolService
$clientID = “<<YourClientIdGuidHere>>”
Write-Host "-----------…

Create Private / Public CDN in SharePoint Online

Here are some command which can help you to create your own CDN :


# Connect to your tenant
Connect-SPOService -Url https://mytenant-admin.sharepoint.com

# Check the current status of CDN capability - by default disabled
Get-SPOTenantCdnEnabled -CdnType Public
Get-SPOTenantCdnEnabled -CdnType Private

# Enable CDN using default settings - -NoDefaultOrigins as optional parameter
Set-SPOTenantCdnEnabled -CdnType Public -NoDefaultOrigins
Set-SPOTenantCdnEnabled -CdnType Private -NoDefaultOrigins

# Get CDN policies
Get-SPOTenantCdnPolicies -CdnType Public
Get-SPOTenantCdnPolicies -CdnType Private

# Add CDN origin
Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl sites/cdn/cdn
Add-SPOTenantCdnOrigin -CdnType Private -OriginUrl sites/pub35/assets

# Get CDN origin
Get-SPOTenantCdnOrigins -CdnType Public
Get-SPOTenantCdnOrigins -CdnType Private

# Public CDN Url, when configured
https://publiccdn.sharepointonline.com/<tenant host name>/sites/sites/library


# Remove CDN origin
Remove-SPOTen…