Thursday, October 3, 2019

Run JavaScript Object Model in HTML Page

Hi All,

I had issues in running JavaScript Object model in HTML page. Since it is not SharePoint page so referring only 'sp.js' won't help. I googled several things and later I got to know that I've to add all the below references to make the JSOM works in an HTML page.

<script type="text/javascript" src="https://uat-intranet.cbreglobalinvestors.com/_catalogs/masterpage/Unite/Scripts/jquery-1.9.1.min.js"></script>

<script src="https://uat-intranet.cbreglobalinvestors.com/_layouts/1033/init.js"></script>

<script src="https://uat-intranet.cbreglobalinvestors.com/_layouts/MicrosoftAjax.js"></script>

<script src="https://uat-intranet.cbreglobalinvestors.com/_layouts/sp.core.js"></script>

<script src="https://uat-intranet.cbreglobalinvestors.com/_layouts/15/sp.runtime.js"></script>

<script src="https://uat-intranet.cbreglobalinvestors.com/_layouts/15/sp.js"></script>

Thanks,
Kunal

Wednesday, May 8, 2019

Deny - Add and customize issue for a user

Hi Folks,

I've received a incident ticket where user shared his concern regarding unable to add/customize pages. We have checked on the ticket and got to know that user do has Full Control access to the SharePoint site. But there is also other thing spotted in permissions check which shows "Deny  -  Add anc Customize Pages".


SharePoint Permissions Issue

We analyzed the issue and observed that Custom Script is disabled for the site.
  • It was very strange to get this type of error as I was logged-in with the Admin account and still getting access denied to certain things and getting no permission to add or customize pages. Therefore, to correct this issue, I checked the Office 365 Admin Portal settings. For this,
    1. Sign in to Office 365 Admin Portal with your admin account.
    2. Go to the SharePoint Admin Centre.
    3. Select Settings.

      Look for “Custom Script” option. In my case, client IT Administrator unknowingly disabled the option, as shown below.

      SharePoint Permissions Issue
  • Now, the solution - Enable or Allow the Custom Script option.

    NOTEAny change to the scripting setting made through the SharePoint Online Admin Centre may take up to 24 hours to take effect.

    SharePoint Permissions Issue
  • After doing the above setting, I waited for 24 hours, and Voila! Now, I am not getting any “Access Denied” error while checking-out the file in SharePoint Designer.

    SharePoint Permissions Issue

    You can use PowerShell command (Set-SPOSite -Identity https://<yourdomain>.sharepoint.com -DenyAddAndCustomizePages $false) also to make the above change, however, just make sure the scripting setting in the admin portal matches what you set using PowerShell.



Thanks,
Kunal

Wednesday, April 17, 2019

Edit page issues with Full control permissions

Hi All,

I was struggling with an issue where the user couldn't able to edit the home page of the site despite having full control permissions to the site via. Owners group. For the meanwhile, I've added user to Site Collection Admin group. But that is not a proper solution to the issue.

I deep dive through internet to identify the root cause. After lot of research, I got to know that if there are no permissions for 'Master Pages and Page Layouts' library then other than site collection administrator no one can edit the pages.

I checked the same to the site and observed that there are unique permissions for 'Master Pages and Page Layouts' library and no one other than site collection administrator can see its content. I made the library inherit permissions from parent and removed the user from site collection admin group as I did earlier. Luckily, it worked and user can able to edit the page without having herself to get added in site collection administrator's group. :)

Thanks,
Kunal Basu

Tuesday, April 2, 2019

Your account is in a bad state - issue

Hi All,

I was facing couple of issues in my project. Here are the following-


  1. User is unable to open the SharePoint Online site in SharePoint Designer. The moment user is trying with his credentials, he received the error message - "Your account is in bad state".
  2. User is trying to update in InfoPath list form by making changes in template.xsn file for that list. He made the changes but when he's trying to publish the form - he get's the error: "Your account is in bad state".

While analyzing the issue, I got to know that legacy authentication is disabled for SharePoint online sites. Hence, modern authentication is enabled. While SharePoint Designer wasn’t natively designed to work with Modern Authentication (ADAL) there are updates available that allow it to work.Most Office 2013 applications will be able to successfully use modern authentication once the EnableADAL=1 registry key has been set. See the below link for the article.



You can refer to the below link for InfoPath related issue as the root cause is same for both SPD and InfoPath Designer.



Thanks,
Kunal