Sharepoint will not let me add custom files or scripts even with scripts enabled

Karl Finlay 1 Reputation point
2021-07-20T03:50:21.037+00:00

I have set up a sharepoint site with the settings enabled for custom scripts. I have tried to upload a custom.css file in the style library but comes with an error message of access denied. I also downloaded 2 app spkg files and uploaded them to my app catalogue in the admin center of sharepoint however when I add the app to my site I do not get access to the webpart attached to that app. App deploys and adds to the site fine but I cannot use it. I have full admin rights and should be able to do all of the above so I need some developer advice or help on this issue.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,689 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,975 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 35,466 Reputation points Microsoft Vendor
    2021-07-21T09:14:41.597+00:00

    Hi @Karl Finlay ,
    To allow custom script in admin center may take 24 hours to take effect. You can try following command in powershell if you don’t have 24 hours to wait.

    Connect-SPOService -Url https://[yourtenant]-admin.sharepoint.com -credential admin@[tenant].onmicrosoft.com   
    Set-SPOSite -Identity https://[yourtenant].sharepoint.com/[siteurl] -DenyAddAndCustomizePages 0  
    

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.