Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Fetching Files from External Resources (e.g., SharePoint) in Blazor WebAssembly" #182

Open
RaveendraReshma opened this issue Dec 7, 2024 · 1 comment

Comments

@RaveendraReshma
Copy link

Context:
I have developed a Chrome extension using Blazor WebAssembly (WASM) and have successfully established bidirectional communication between JavaScript and .NET Core functions. The extension incorporates business logic built with .NET Core 8 and runs entirely in the browser, with no server-side logic or API calls.

Requirement:
I need guidance or suggestions on how to fetch files from external resources, specifically SharePoint, to read the file contents.

Challenges:

  • Many SharePoint-related NuGet packages, such as:
  1. Microsoft.SharePoint.Client - is not compatible in .net core 8
  2. PnP Core SDK - require a Client ID and Tenant ID, which are unavailable in this scenario due to certain reasons.
  • The extension entirely runs client-side.

Goal:
To enable the extension to:

  1. Connect to external resources (like SharePoint).
  2. Fetch and read files securely without relying on Client ID and Tenant ID.

Questions:

  1. Are there any recommended approaches or alternative libraries suitable for client-side Blazor WebAssembly that do not require Client ID and Tenant ID?
  2. Is there a way to use organizational credentials or service accounts securely in this setup?
@mingyaulee
Copy link
Owner

As far as I know, there is no way to do this just with Blazor WASM in chrome extension, you would need to connect to another proxy server or native application to act as a client. Developing a browser extension with Blazor has the same limitations as with any other JS framework. Even if you embed the client credentials in the binaries, it can still be decompiled to view the code of the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants