Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    cardinalpipkin
    @cardinalpipkin
    @koltyakov - thanks. Not for me then. Do you know if Graph API can be used to impersonate/elevate permissions for SPFX webpart? I understand that this functionality will be implemented into a future version of SPFX. Do you know if it already has?
    Andrew Koltyakov
    @koltyakov
    There is no client-side way for impersonation. Only:
    • Call a web service which authenticates user, decides if a user allowed for an action, then calls another service with service acc context
    • Indirect delayed impersonation: like create an item which calls a workflow/flow
    cardinalpipkin
    @cardinalpipkin
    @koltyakov - "Indirect delayed impersonation: like create an item which calls a workflow/flow" can you give me an example of this?
    Andrew Koltyakov
    @koltyakov

    @cardinalpipkin this "create an item which calls a workflow/flow" is actually an example =)

    Well ok, let me elaborate:

    • There is a list Customers which is read-only for a user
    • As an elevation scenario a user should update Customer's status
    • There is another Actions list where a user can add items into it
    • In an app, for changing a status a user creates a "signal" item in Actions
    • On item creation in Actions list, a Flow/WF/Webhook* is triggered
    • What is triggered checks is an author has "rights" to update a status and if so, updates Customer's item using permissions elevation step/etc.
    cardinalpipkin
    @cardinalpipkin
    @koltyakov - Thanks. I'm using MS Flow to break inheritance and clear all permissions with an uploaded file, then JavaScript attempts to rename the FileLeafRef of the doc. Problem is....timing. MS Flows are slow to start so the triggering user doesn't have permission on the file and the JavaScript cannot rename the file. I have to clear permissions on each file because it's a shared lib. The limitations of client side coding with SharePoint!!!!
    Tom G
    @t0mgerman

    Is it possible to get user photos from the graph without having my SPFX web part needing to be authorised by admin? I guess I need clarification on this:

    By default, the service principal has no explicit permissions granted to access the Microsoft Graph. However, if you request an access token for the Microsoft Graph, you get a token with the user_impersonation permission scope that can be used for reading information about the users (that is, User.Read.All).

    Source: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-msgraph#available-permission-scopes

    The problem I have is that I'm working with an NHS (Health Service) client in the UK - they use the government's Hybrid 365 offering, which melds NHS Mail with Office 365. The central administration / azure stuff is all handled by Accenture, so I don't have easy access to any of that. Its possible to apply via their desk to have something approved but its such a pain and if there's a way to avoid it I'm all ears...

    All I want are profile photos. I am finding /_layouts/15/userphoto.aspx?size=L&username=workemailhere a bit unreliable. https://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email=workemailhere works - but I'm finding that if users haven't opened Outlook OWA in addition to SharePoint - the images don't necessarily load. Same thing with Delve.

    Any help most appreciated!

    utahisnotastate
    @utahisnotastate
    probably a long shot but it is absolutely impossible to build a spfx webpart using the yeoman generator but instead of building a .sppkg it creates a html/css/js build we can use in a CEWP instead?
    Mists13
    @Mists13

    Hi Team. I'm having a problem when trying to retrieve information from a list on sharepoint. The following code was working correctly before, and works on my colleague's machine.

    async function getUserIDs (sprequest,spInfo) {
    
        const credentialOptions = {
            username: spInfo.sp_user,
            password: spInfo.sp_password
        }
        const spr = sprequest.create(credentialOptions)
    
        const tableInfo  = 'GetByTitle(\'delimitados_qas\')//items?'
        const selectParams  = `U_ID,Title,Subinfotipo`
    
        return await spr.get(spInfo.sp_url + tableInfo + selectParams)
    }

    I'm using the correct credentials, but i'm receiving this error:

    Error: <s:Fault>
    <s:Code>
    <s:Value>s:Sender</s:Value>
    <s:Subcode>
    <s:Value xmlns:a="http://docs.oasis-open.org/ws-sx/ws-trust/200512">a:FailedAuthentication</s:Value>
    </s:Subcode>
    </s:Code>
    <s:Reason>
    <s:Text xml:lang="en-US">MSIS7068: Access denied.</s:Text>
    </s:Reason>
    <s:Detail>
    <IssuanceAuthorizationFault xmlns="http://schemas.microsoft.com/ws/2009/12/identityserver/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
    </s:Detail>
    </s:Fault>
    at c:\Users\flor_active_msg\node_modules\node-sp-auth\lib\src\utils\AdfsHelper.js:32:23

    nik sur
    @ruskin_twitter
    Hello. Is it possible to only download the files that are new? Like comparing the files from destination folder. I want it to work in a way that it doesn't download the same files over and over again? Thank you. =)
    Andrew Koltyakov
    @koltyakov
    nik sur
    @ruskin_twitter
    Thank you!
    Andrew Koltyakov
    @koltyakov
    NP! =)
    ishtjot
    @ishtjot
    What would be good knowledge base for beginer sharepoint online?
    Burnfireblaze
    @Burnfireblaze
    Hi, I am new to node, is there a way to create folders and upload documents using Node.js in Sharepoint?
    Are there any tutorials which explain these, and what npm modules to use?
    Andrew Koltyakov
    @koltyakov
    @Burnfireblaze please check spsave https://github.com/s-KaiNet/spsave
    krandor305
    @krandor305
    Hello everyone,is there a way to automatically authenticate the user from the sharepoint context without giving hard coded login and passwords?
    Burnfireblaze
    @Burnfireblaze
    @koltyakov Thanks a lot for spsave, finished uploading of files. But , now I need to download files, any library to do that? I tried using sppull but I am facing an error.
    Burnfireblaze
    @Burnfireblaze

    This is the code I used:
    const { SPPull } = require('sppull');

    const context = {
    siteUrl: "http://contoso.sharepoint.com/subsite",
    creds: {
    username: "user@contoso.com",
    password: "Password",
    online: true
    }
    };

    const options = {
    spRootFolder: "Shared%20Documents/Contracts",
    dlRootFolder: "./Downloads/Contracts"
    };

    /*

    • All files will be downloaded from http://contoso.sharepoint.com/subsite/Shared%20Documents/Contracts folder
    • to __dirname + /Downloads/Contracts folder.
    • Folders structure will remain original as it is in SharePoint's target folder.
      */
      SPPull.download(context, options)
      .then((downloadResults) => {
      console.log("Files are downloaded");
      console.log("For more, please check the results", JSON.stringify(downloadResults));
      })
      .catch((err) => {
      console.log("Core error has happened", err);
      });
    As given in sp pull library example
    Burnfireblaze
    @Burnfireblaze
    Screenshot (535)_LI.jpg
    This is the error^
    Any help from anyone would be appreciated
    Burnfireblaze
    @Burnfireblaze
    @koltyakov Anything which would help me?
    Burnfireblaze
    @Burnfireblaze
    I need to get the files in the folder in sharepoint and display them for download in react front end
    Burnfireblaze
    @Burnfireblaze
    tried sp-download but couldn't make it work
    I have solved the above error in the image, but no files are downloading, its 0 out of 0 always
    Burnfireblaze
    @Burnfireblaze
    Any proper examples for sp-download?
    other than the npm examples
    Andrew Koltyakov
    @koltyakov

    Hi @Burnfireblaze,

    Thanks for the interest in the libraries.

    This is the error^

    This looks as if you were provided a wrong creds or a wrong strategy.
    Is it SharePoint Online or Onprem?

    sp-download examples

    https://github.com/koltyakov/sp-download#minimal-setup-typescript

    It's just it. There could be no other examples. sp-download is a bare minimal one use case lib and cli.
    In tests, there is a bit more, https://github.com/koltyakov/sp-download/blob/master/test/integration/tests.spec.ts, yet in terms of examples it's the same exactly pattern.

    sppull

    The different examples can be checked in the manual tests https://github.com/koltyakov/sppull/tree/master/test/manual
    Or in integration tests.

    While you're experiencing the issues with a straightforward scenario which just works for others, my guess you're providing a wrong path to site or folder or file, or wrong creds or strategy.

    Please check this wiki for the auth strategies https://github.com/s-KaiNet/node-sp-auth/wiki

    I'd suggest separating a possible issues by checking auth first - https://github.com/koltyakov/node-sp-auth-troubleshoot - this project setup allows quickly check if auth works. Don't try populating config manually, but use the wizard and then check what the private.json ended up with.

    Burnfireblaze
    @Burnfireblaze
    And is there anyway to get the names of files inside the folder?
    Andrew Koltyakov
    @koltyakov
    mmorandini
    @mmorandini
    Hello everyone, I have been experiencing a strange issue with the node-sp-auth package and I am hoping to get some help here hopefully.
    The issue is that when calling the getAuth() with client_id and client_secret only, everything seems to be working ok (in that I don't get any errors back), but when the promise resolves, the access token comes back as undefined, so the "headers" object looks like this: {'Authorization': 'Bearer undefined'}.
    Do you have any idea as to why this could be happening? Also worth mentioning that I have been observing this behavior only since yesterday, and that my integration was working fine before.
    Andrew Koltyakov
    @koltyakov
    Hi @mmorandini, did you prolongate the add in? By default an add-in registration is actual per a year, then needed secret update.
    mmorandini
    @mmorandini
    Hi @koltyakov, I didn't and this could be te case actually. I'll look into that. The thing that scared me was not receiving any errors back. I'll let you know how it goes :)
    Rushabh Wadkar
    @rushabh_wadkar_twitter
    Hello guys! I have a problem statement where I want to upload a file to company's sharepoint and also retrieve the public url of that file using node/python. Can anybody suggest me how to achieve this ? I tried reading the docs but didn't understand it. It would be great if someone points me to the right direction. Thanks :)
    Rushabh Wadkar
    @rushabh_wadkar_twitter
    I tried spsave but it isn't working properly. getting this error - " spsave: Error: No XML to parse!" Please help!
    Burnfireblaze
    @Burnfireblaze
    Hi @koltyakov I have an urgent need. Are there any npm modules to rename a folder?
    on sharepoint
    would spsave or sppurge or sppull or any oher modules work?
    Andrew Koltyakov
    @koltyakov
    A raw query via sprequest or PnPjs
    Burnfireblaze
    @Burnfireblaze
    HI Andrew but am not aware of the exact process, do you have any documentation?
    Can you please elaborate what I should do??
    Andrew Koltyakov
    @koltyakov
    https://github.com/SharePoint-NodeJS/pnp-auth - how to authenticate in Node.js environment
    Vaji95
    @Vaji95
    Hello, everyone.
    I have to create a react native app with which I can upload files to sharepoint 2019. Sharepoint is authenticated with adfs.
    the user must be able to authenticate himself with adfs in my app. is that possible? if so, do you know any documentation or a tool?
    Danny Foncke
    @dannyfoncke
    Hi all - I wonder if(how) I could get following scenario to work:
    context:
    • user is on local pc in browser logged on to SP2019 onprem (ADFS)
    • in SP page a js script connects to a nodejs api
      question(s)
    • Can the js script pass the user authentication to nodejs ?
    • Can nodejs check the authentication with SP ?
    casperan
    @casperan
    any sharepoint developers here ???