Code Monkey home page Code Monkey logo

pnp-guidance's People

Contributors

antonsmislevics avatar biste5 avatar erwinvanhunen avatar frankmarasco avatar gavinbarron avatar jansenbe avatar jpalo avatar jthake avatar lauragra avatar mjimison avatar officecpub avatar olprod avatar paolopia avatar patrick-rodgers avatar pieter-veenstra avatar piotrekkrakowiak avatar ramonitor avatar robmhoward avatar roharp avatar rtielke avatar saldana avatar seanhyde avatar spdoctor avatar sudeepghatak avatar taojunshen avatar tbag avatar thechriskent avatar vesajuvonen avatar xristophd avatar zimmergren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pnp-guidance's Issues

The object specified does not belong to a list while extracting Project Site Collection Template

Hi,

I am extracting office 365 project site collection by using the below powershell script
Connect-SPOnline
Get-SPOProvisioningTemplate -Out "PnP-Provisioning-File.xml"

but i am getting below error while extracting the project site collection
**The object specified does not belong to a listGet-SPOProvisioningTemplate : The object specified does not belong to a list.
At line:1 char:1

  • Get-SPOProvisioningTemplate -Out "PnP-Provisioning-File.xml"
  • - CategoryInfo          : WriteError: (:) [Get-SPOProvisioningTemplate], ServerException
    - FullyQualifiedErrorId : EXCEPTION,OfficeDevPnP.PowerShell.Commands.Branding.GetProvisioningTemplate**
    
    

Please help me out on this

startIndex cannot be larger than length of string. Parameter name: startIndex for apply site provisioningtemplate

I followed the exact same steps as mentioned in the sample but I get this error for a simple site.

at System.String.Substring(Int32 startIndex, Int32 length)
at System.String.Substring(Int32 startIndex)
at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.TokenParser..ctor(Web web, ProvisioningTemplate template)
at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.ApplyRemoteTemplate(Web web, ProvisioningTemplate template, ProvisioningTemplateApplyingInformation provisioningInfo)
at Microsoft.SharePoint.Client.WebExtensions.ApplyProvisioningTemplate(Web web, ProvisioningTemplate template, ProvisioningTemplateApplyingInformation applyingInformation)

XMLTemplateProvider provider = new XMLFileSystemTemplateProvider(@"D:\templates", "");
var result = provider.GetTemplate("SampleTeamSite.xml");
if(result.PropertyBagEntries.Count >1)
{
ProvisioningTemplate template = result;
Web newweb = ctx.Web.GetWeb("amarnugettest5");
newweb.ApplyProvisioningTemplate(template);

}

Unable to fully Provision UnifiedGroup using New-PnPUnifiedGroup

Hello,

I'm trying to provision programmatically an Unified group using the following command:

New-PnPUnifiedGroup -DisplayName "PnpGroup1" -Description "Group Created With Pnp" -MailNickname "PnpGroup1" -Members "[email protected]" -IsPrivate

The group itself is well provision but the linked sharepoint site collection is never provision. After two days, the "Site Url" property of my unifiedgroup still returns "Unable to provision resource".

image

Note that if I browse through the group using outlook online and then I click on the "file" tab and the button "browse library" then it triggers the sharepoint site collection creation.

Is there a way to fully generate the unified group (and the linked sharepoint site collection) using cmdlet ?

Thx for your feedback

Property bag guidance and supported approaches

Article to collect all property bag keys and how they can be used to control settings, which are not available directly with CSOM. Things like.

  • Publishing features - Available page layouts, web templates, default page layout
  • Control Metadata driven navigation settings
  • Enable records management in list level

One article with all the supported properties (table listed with sub chapters for additional details), including sample for each of them

Incorrect formatting of bullets in IE11 (VSTS BUG 1480313)

attachfilehandler

Repro Steps:

  1. Navigate to https://msdn.microsoft.com/zh-cn/pnp_articles/Sandbox-Solution-Transformation-Guidance-Feature-Receivers
    For US topic open this page in IE11: https://msdn.microsoft.com/en-us/pnp_articles/Sandbox-Solution-Transformation-Guidance-Feature-Receivers#options-for-replacing-feature-receivers
    2.Check the bullet in page

Actual Result:
The format of bullet dispalys incorrectly

Expected Result:
The format of bullet dispalys correctly

App Model -> Add-in Model

A lot of guidance material, PowerPoints etc. are referring to "App model". Would it be worth going through these now and updating with new nomenclature?

Access denied for ctx.ExecuteQuery()

I'm trying to follow this guide for customizing Sharepoint on O365 with javascript:
https://github.com/OfficeDev/PnP-Guidance/blob/master/articles/Customize-your-SharePoint-site-UI-by-using-JavaScript.md

When I run the Core.EmbedJavascript project, it deploys to my O365 developer site successfully, but after I authorize O365 to trust my app and my browser redirects to

https://localhost:44300/Pages/Default.aspx?SPHostUrl=https%3a%2f%2fiantest123.sharepoint.com&SPLanguage=en-US&SPClientTag=0&SPProductNumber=16.0.5018.1216

I get this error:

Server Error in '/' Application.

Access denied. You do not have permission to perform this action or access this resource.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Microsoft.SharePoint.Client.ServerUnauthorizedAccessException: Access denied. You do not have permission to perform this action or access this resource.

The entire error listing is here:
http://pastebin.com/73TJvDW7

Does anyone know how to fix this?

Thanks in advance.

FinishUpload does not honour Libraries ForceCheckout setting when set to false

On this page --> https://msdn.microsoft.com/en-us/pnp_articles/upload-large-files-sample-app-for-sharepoint is a method - UploadFileSlicePerSlice - I have re-purposed but essentially follows the same process i.e. if file is < 3MB use ContentStream otherwise upload the file in slices (StartUpload/ContinueUpload/FinishUpload).

I have discovered that the returned 'uploadFile' is in a different state depending on which of the two options are used. When attempting to access 'uploadFile' (e.g. ListItemAllFields) after FinishUpload an error is thrown saying can't access stream once closed. I added a ctx.Load(uploadFile) between the FinishUpload and the ctx.ExecuteQuery() and now uploadFile is returned from both paths in a similar state. Should the sample function be amended to show this?

However, further to this, it seems the slicing option does not honour the Libraries ForceCheckout and EnableVersioning settings when set to false.

After uploading a large file to a Library where "Document Version History" is set to "No Versioning" and the "Require Check Out" is set to "No". There are two versions of the file (one version for file upload and the other version where values on the ListItem are set) and the file is in a Checked Out state to the user who ran the upload.

I suspect only part of this issue is relevant to this repo.

Rendering JSON from an XSLTListViewWebPart

Hi, The article on performance gave great advice on optimizing ajax calls. I've found one of the best optimizations was to avoid making the ajax call at all and just delivering the content on the initial payload from a listviewwebpart..

https://yetanothersharepointblog.wordpress.com/2014/04/09/rendering-json-from-an-xsltlistviewwebpart/

It would be great if this was supported out-of the box.

It would be even better if an SPFX webpart could include a CAML(or rest) query in its manifest that specified the data it needed to start, and that data was just there automatically when the webpart started without making any ajax calls.

How to get Access Token to Create Modern site using CSOM

I tried create "modern" site using CSOM method "ManipulateModernTeamSite(string accessToken)", but I am getting invalid Access Token.
I have created Azure Hosted app to create Modern site. App is installed in one of the SharePoint Site with App-only Access policy. This App has SharePoint Online Administrator Access. When User submit the request it should create Modern site. I am using below code snippet to get Access token but I am getting Invalid access token. Please let me know how to get access token to create Modern site.
Any Quick Solution to resolve this issue is Appreciable. Thanks.

Current code snippet to get access token getting invalid access token:
var tenantStr = hostWebUrl.ToLower().Replace("-my", "").Substring(8);
tenantStr = tenantStr.Substring(0, tenantStr.IndexOf("."));
var tenantAdminUri = new Uri(String.Format("https://{0}-admin.sharepoint.com", tenantStr));
string realm = TokenHelper.GetRealmFromTargetUrl(tenantAdminUri);
var accessToken = TokenHelper.GetAppOnlyAccessToken(TokenHelper.SharePointPrincipal, tenantAdminUri.Authority, realm).AccessToken;

Error:
[07.19.2017 02:44:09] Error at CreateSiteCollection : Code: InvalidAuthenticationToken
Message: Access token validation failure.

Inner error

[07.19.2017 02:44:09] Error is: at Microsoft.Graph.HttpProvider.d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Graph.BaseRequest.d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Graph.BaseRequest.d__32`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at OfficeDevPnP.Core.Framework.Graph.UnifiedGroupsUtility.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at OfficeDevPnP.Core.Framework.Graph.UnifiedGroupsUtility.CreateUnifiedGroup(String displayName, String description, String mailNickname, String accessToken, String[] owners, String[] members, Stream groupLogo, Boolean isPrivate, Int32 retryCount, Int32 delay)
at Takeda.SelfService.AppOnlyWeb.Helper.ManipulateModernTeamSite(ClientContext ctx, SiteRequestInformation siteInfo, String hostWebUrl)

Article on ContentType Guidance

As far as i know: Best Practice is to create ContentTypes only on the Rootweb of the Site Collection.
Just wanted to share some resources on that with a colleague, but couldn't find this in the pnp-articles.

I would have expected the information in this article:
https://msdn.microsoft.com/en-us/pnp_articles/site-columns-and-content-types-sharepoint-add-in

The only place where i can find this is in the following comment of the "ObjectContentType.cs":

// if this is a sub site then we're not provisioning content types. Technically this can be done but it's not a recommended practice
https://github.com/SharePoint/PnP-Sites-Core/blob/master/Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectContentType.cs

So it would be nice to get more detail about the reason why this is not recommended.

Incorrect formatting of bullets in IE11 (VSTS BUG 1480318)

Repro Steps:

  1. Navigate to https://msdn.microsoft.com/zh-cn/pnp_articles/Sandbox-Solution-Transformation-Guidance-Event-Receivers
    For US topic open the page in IE11 - https://msdn.microsoft.com/en-us/pnp_articles/Sandbox-Solution-Transformation-Guidance-Event-Receivers#options-for-replacing-event-receivers
    2.Check the bullet in page
    attachfilehandler 1

Actual Result:
The format of bullet dispalys incorrectly

Expected Result:
The format of bullet dispalys correctly

searched based nav

hi,
excellent series of articles. thanks,
the discussion on navigation seemed to write off search based nave, and did not even mention security trimming.

is there a reason search based nav is discouraged?
can security trimming be added to the other options?

SocketException during ApplyProvisioningTemplate

I'm getting the following exception during ApplyProvisioning Template:

Only one usage of each socket address (protocol/network address/port) is normally permitted

In my code I first create the site collection using CreateSiteCollection which goes fine. Next, I call ApplyProvisioningTemplate which throws the exception.

The full stack trace is below:

Error when processing request 4d33277a-e0b8-4e7b-9733-66b2839f3896|System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted 10.225.8.182:80
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()
   at Microsoft.SharePoint.Client.ClientContext.GetFormDigestInfoPrivate()
   at Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()
   at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
   at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryImplementation(ClientRuntimeContext clientContext, Int32 retryCount, Int32 delay)
   at Microsoft.SharePoint.Client.TenantExtensions.CreateSiteCollection(Tenant tenant, SiteEntity properties)
   at Pfa.SharepointProvisioning.Integration.Sharepoint.SharepointConnector.CreateSiteCollection(SiteCollectionCreationInformation information, SharepointInstanceInformation sharepointInstanceInformation) in E:\T\b2\w\29\s\Pfa.SPProvisioning\Pfa.SPProvisioning.Integration.Sharepoint\SharepointConnector.cs:line 51

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.