Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
544 views
in Technique[技术] by (71.8m points)

typescript - How to download multiple files as zip from sharepoint library using graph api url in Angular?

I want to download files from share point using graph api in client side (Angular)

Installed msal-angular and microsoft-graph-client packages.Logged in to app with microsoft account. And i tried to download file using graph client by passing graph api(passed graph api token as well) . But am getting different access issues while downloading.

 async downloadDocument(): Promise<void> {
    try {
     let result =  await this.graphClient
         .api('/sites/testenv.sharepoint.com...../sample.pdf:/content')
         //.api('/me/events')
        //.select('subject,organizer,start,end')
        .get()
        return result.value
    } catch (error) {
      throw Error(JSON.stringify(error, null, 2));
    }
  }

Is there any other way to download file from sharepoint library? Or please provide any reference for downloading file using microsoft-graph-client

question from:https://stackoverflow.com/questions/65934706/how-to-download-multiple-files-as-zip-from-sharepoint-library-using-graph-api-ur

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...