OneDrive / samples

Contains samples, scenarios, and guidance for integrating with OneDrive and SharePoint drives, drive items, and files.
MIT License
58 stars 59 forks source link

Basic JS Sample not working with https://xxxx.sharepoint.com and https://xxx-my.sharepoint.com at the same time #22

Closed capedrolima closed 1 year ago

capedrolima commented 1 year ago

Hi guys, We are using the basic javascript samples provided, but we have the same problem described in ticket 7

We aim to make it possible for the user to select files/folders from both places (Recent, My Files, QuickAccess-Sharepoint). But it looks like we need to manage different tokens. Right now, as a workaround, we have two starting point URLs.

FilePicker-my sharepoint

Some of you can help us to make the basic javascript sample works with both scenarios? I'm not sure if @patrick-rodgers already spoke with the team about it.

Historical information from [ticket 7] Glad you got it working, we'll have to review the demo code and see what might be wrong there. Thanks! Originally posted by @patrick-rodgers in https://github.com/OneDrive/samples/issues/7#issuecomment-1179221122

Thanks in advance, the feature is really helpful.

patrick-rodgers commented 1 year ago

Sorry - not sure what you are asking for. The picker is meant to per instance target one location or the other. Hence the baseUrl value which is used to load it in the service. You would need to manage different tokens as they are different resource (my vs sp). Can you explain a bit more on what you are looking to enable?

capedrolima commented 1 year ago

Hi Patrick, thanks for your explanation and sorry for the misunderstanding. We were able to manage the different tokens internally. Thanks again!

patrick-rodgers commented 1 year ago

Right on, thanks for using the control!