-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Graph demo component/controller in the hosted WASM project template? #45394
Comments
Potentially related to #42487 |
To learn more about what this message means, what to expect next, and how this issue will be handled you can read our Triage Process document. |
I did see that, but I thought that the underlying problem was fixed as part of a series of updates for 7.0 auth. I'll post the link to that PR here when I get home. I'm OOF at the moment. UPDATE: Actually, it doesn't look as related as I thought: #29384 and fixed by #43954. Since our topic uses a dedicated named UPDATE: I see what is meant by #42487 ... no way to delegate permissions to a WASM app for B2C. Our Graph named- |
We aren't positive it's related, just cross-linking for now |
One more description NIT for consideration ... The authorization option
Cross-ref to the However, the Graph option description states ...
" |
To learn more about what this message means, what to expect next, and how this issue will be handled you can read our Triage Process document. |
Hi. Thanks for contacting us. |
Is there an existing issue for this?
Describe the bug
The
ShowProfile
component is referenced in the Blazor WebAssembly template (for the hosted option scenario) at ...... and the controller (
ShowProfileController
) is mentioned at https://github.com/dotnet/aspnetcore/blob/main/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/template.json#L254... but the project template doesn't seem to have these any longer. I guess that they were removed at some point ...
A generated hosted WASM project (7.0) with
SingleOrg
auth refers to theShowProfile
component inNavMenu.razor
, but it isn't in the app ...The only place I see the
ShowProfile
component these days is in the Blazor Server project template at ...https://github.com/dotnet/aspnetcore/blob/main/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/ShowProfile.razor
... and the Blazor Server template's
ShowProfile
component merely performs a straight Graph API call (GraphServiceClient.Me.Request().GetAsync()
) (i.e., everything is done server-side, no web API-controller scenario is present and no controller).ALSO, I mention in passing that the current .NET CLI help for
--calls-graph
doesn't mention that it's a scenario for hosted WASM, not standalone, at ...https://github.com/dotnet/aspnetcore/blob/main/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/template.json#L610
... which states ...
... but single org auth is possible for a standalone WASM app, too. Nothing happens for standalone apps due to the requirement for the hosted WASM scenario ... you get no Graph config at all for standalone + SingleOrg. I wonder if that text should mention that it's only for hosted WASM ... 🤔 something like ...
... and I changed "web app," too.
Phrased another way ...
... and a third way ...
Expected Behavior
Since the hosted WASM app generated does have Graph configured in
Program.cs
of the server app ...... it seems like the controller should be in the server app and a
ShowProfile
component should be in the client app to hit it up for user data. It seems like that would be the most helpful for devs who aren't familiar with what to do next and who aren't aware of our WASM Graph API topic. It's also consistent with internalNavMenu.razor
naming ofClient/Shared/NavMenu.CallsMicrosoftGraph.razor
.Otherwise, I suppose the template-generating config and
NavMenu
component would be refactored to remove these mentions/configurations.Steps To Reproduce
Generate a 7.0 app with ...
Check the
NavMenu
component to see the link, but there's noShowProfile
component in the app, and there's noShowProfileController
in the server project.Exceptions (if any)
None other than the
ShowProfile
link going nowhere..NET Version
7.0.100
Anything else?
No response
The text was updated successfully, but these errors were encountered: