Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 26 2020 12:51
    anna-talley unassigned #59
  • Jun 18 2019 13:42
    patrick-rodgers closed #830
  • Jun 18 2019 13:42
    patrick-rodgers opened #830
  • Jul 10 2018 12:58
    patrick-rodgers closed #751
  • Jul 10 2018 12:58
    patrick-rodgers closed #753
  • Jul 10 2018 12:58
    patrick-rodgers closed #758
  • Jul 10 2018 12:57
    patrick-rodgers closed #815
  • Jul 10 2018 12:57
    patrick-rodgers closed #823
  • Jul 10 2018 12:57
    patrick-rodgers closed #824
  • Jul 10 2018 12:57
    patrick-rodgers closed #825
  • Jul 10 2018 12:57
    patrick-rodgers closed #829
  • Jul 10 2018 12:57
    patrick-rodgers commented #829
  • Jul 10 2018 11:06
    Mike-tech opened #829
  • Jul 06 2018 18:26
    koltyakov labeled #828
  • Jul 06 2018 18:21
    ken-harris commented #828
  • Jul 06 2018 18:21
    ken-harris closed #828
  • Jul 06 2018 17:51
    koltyakov labeled #828
  • Jul 06 2018 17:51
    koltyakov commented #828
  • Jul 06 2018 14:23
    ken-harris opened #828
  • Jul 06 2018 13:18
    koltyakov labeled #827
jmls
@jmls
if I remove the "dec" the list is not found (obviously)
but if I use the "dec" it falls over as it's not a valid guid
Eirik Brandtzæg
@eirikb
dec is part of the guid. I can't see why it should fail.
jmls
@jmls
and now, of course, it's working with dec
wtf
I know I got an error because I was surprised
so, this was the error Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
jmls
@jmls
I wish I'd kept the stack trace now
thanks for the help - I do need to ask though, so an Id field can have a prefix like dec ? None of the other lists have such an id, and it's slightly concerning why this one does
Eirik Brandtzæg
@eirikb
dec is not a prefix, it's part of the guid
jmls
@jmls
ok, thanks
Ole Bergtun
@trillian74
i'm trying to move a file from one library to another library. Both libraries resides in the same subsite (yes i know... long story:) this is a legacy site from 2014). But i keep getting this operation is not supported error. Is it not possible to move files using pnp on subsites? file.moveByPath(`/sites/bms/procedures/archived documents/${fileref}`,true,true) file resides on same subsite but in another library...
Andrew Koltyakov
@koltyakov
What’s SharePoint version? ByPath is only available in SPO (and maybe in 2019). No such method in the API in older versions.
Ole Bergtun
@trillian74
It is SPO.
Ole Bergtun
@trillian74
i used another api: https://blog.velingeorgiev.com/createcopyjobs-api-copy-move-SharePoint-files-folders worked for me... don't know if this could be deprecated (hope not)
jmls
@jmls
is there any limit to the nunber of users returned by siteUserInfoList.items() ? I have a bunch of users that are not returned using this call, but all of them seem to have an id higher than 200 ish ..
it may be that items.getAll() is what I need . will check ;)
Andrew Koltyakov
@koltyakov
Default REST’s .top is 100, if it’s less then 5000 users, top can be established to a greater number.
Ole Bergtun
@trillian74

I'm moving some documents to archive on a regular basis... i'm experiencing some strange error when moving a file: Save Conflict

Your changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes. CallStack -- there are nobody touching these files right now? Have you guys seen this error? it's "old" files from 2015 (if we regard that as old:) ) I am using the CreateCopyJobs api for this. These files cannot be moved manually either.

Some ideas on where to look or mayby properties to check? (these files have had in-place record holds on them (no longer), but others that also had that were moved...) #lovinIt

Eirik Brandtzæg
@eirikb
Are there any locations to store arbitrary configuration/settings? We currently have a mix of SharePoint and CosmosDB (delivered through Azure Functions).
I've heard it could be possible to store setting (organization-wide, and user) in Microsoft Graph, is this true?
I noticed that Apps (we use multi tenant AAD App) have "Extensions", perhaps that's something?
Eirik Brandtzæg
@eirikb
Maybe this is what I want: https://blog.mastykarz.nl/easiest-store-user-settings-microsoft-365-app/
There's a magic path I can use: https://graph.microsoft.com/v1.0/me/drive/special/approot:/settings.json
But I wonder, must a user have special permissions to read this? (The blog post talks about writing, but only admins should do that in my case).
Eirik Brandtzæg
@eirikb
So far so fail: Special app folder seems to be personal, I can't put shared config in there.
Application extensions could have worked, but require Application.Read.All permissions. This permission require admin consent which is sad, but it also grants the acquired token access to all applications.
Eirik Brandtzæg
@eirikb
After some research I've decided to create my own config system.
Azure Functions. Decode + JWT token, extract tenant id and app id, use that as container and blob prefix, then fetch (and cache) json from blob.
Allow update based on Roles in AAD App (also in JWT). Clear cache upon save.
Eirik Brandtzæg
@eirikb
Is it possible to get the Teams link (link to a Teams) with SharePoint API only?
Eirik Brandtzæg
@eirikb
@koltyakov Do you think it would be possible (or too crazy, and way too late) to build a custom "sp.js"?
I don't mind sp.js, but it's a bit big, and has odd dependencies (not easy to use outside of SP).
The requests aren't very special it seems, some XML. I've tried making some manual requests and it works fine (as expected).
My idea is to write a simple generic handler, then use the types from @types/sharepoint to generate the rest, and use xml2js to create the XML.
I'm never going to do this, but it feels it would be really nice to have, or it would have been some years ago :)
Andrew Koltyakov
@koltyakov
Hey @eirikb, sorry missed lots of social messages recently.
Do you think there is a value in a separate library with JSOM nowadays? I mean for the relatively rare cases JSOM is needed you either load sp.js (no matter the size) or grab some methods XML packages to extend places where REST fails to provide a solution.
Anyways, if you have an idea how to generate JSOM XML in a generic and universal way I'm interesting to see it. As I did some CSOM XML generation for Go and there was something in PnPjs, however, I can't say that generated JSOM XML is a fun to maintain. =)
Eirik Brandtzæg
@eirikb
Many years too late to be sure. So not anything I'm planning to spend time on, just wondering aloud. But the TS types for sp are not that old, and it would have to be generated based on those.
From my small tests a lot of the XML isn't that important, and some parts that look magical can either be hard coded or simply removed.
Only reason to try this would be if TS types + tiny XML generation (recursively) could yield a working example. Like < 300 LOC and then generate the rest.
Benefits:
  • As you said, full support for all APIs. REST is getting there, but after many years it's still not 100% AFAIC
  • If you need sp, then you probably end up with these files: microsoftajax.js, init.js, sp.js, sp.runtime.js, and others when required, such as sp.taxonomy.js.
    Replace all of these with "neosp.js".
  • Better support of async/await and MSAL
  • GraphQL <- single requests to query data many "levels" down. The library API for this could be made very smooth.