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

fets #1354

Closed
hannespreishuber opened this issue Jun 13, 2021 · 2 comments
Closed

fets #1354

hannespreishuber opened this issue Jun 13, 2021 · 2 comments
Assignees
Labels
investigating TA:VS Team Area: Visual studio

Comments

@hannespreishuber
Copy link

hannespreishuber commented Jun 13, 2021

try to get SharePoint lists in Teams Blazor App
var listex = await graphClient.Sites["root"]
.Lists
.Request()
.GetAsync();
shows empty result.

my guess missing scopes. So gave in azure portal read.write and changed
xport async function getToken() {
var credential = new TeamsUserCredential();
var scope = ["User.Read", "Sites.Read.All", "Sites.ReadWrite.All"];
console.log("xxxxx");
var token = credential.getToken(scope);
return token;
}

export async function popupLoginPage() {
var credential = new TeamsUserCredential();
var scope = ["User.Read","Sites.Read.All","Sites.ReadWrite.All"];
await credential.login(scope);
return;
}

doenst solve my problem

@therealjohn therealjohn added the TA:VS Team Area: Visual studio label Jun 14, 2021
@JerryYangKai
Copy link
Contributor

JerryYangKai commented Jun 15, 2021

Hi @hannespreishuber, here is the suggestion from mine and it may help you find the reason, since we only got JavaScript version of microsoft/teamsfx sdk, so we including webpack to wrapper it and using JSRuntime to trigger it in Blazor.
These code you paste it is in JS/src/index.js, this is the webpack src code, have you using webpack to refresh the webpack file (wwwroot/teamsfx.js)? JSRuntime using wwwroot/teamsfx.js to trigger sdk.

@eriolchan
Copy link
Contributor

Thanks @hannespreishuber for the feedback, you can follow Kai's instruction to try it again. Since this thread has no more new information for over 7 days, I will close it. If you still meet with this issue, feel free to reactive it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating TA:VS Team Area: Visual studio
Projects
None yet
Development

No branches or pull requests

5 participants