Move the Blazor WebAssembly with Graph API content to a new doc#20192
Move the Blazor WebAssembly with Graph API content to a new doc#20192
Conversation
|
@jmprieur I placed the code directly into the comment above ☝️ to make it easy for you to run an eye over it. However ...WRT the new approaches on AzureAD/microsoft-identity-web#705 ... I'm working with Tell me one thing tho if I'm going to update to the latest daemon app approach now: Do I need to consider if the Graph access token ever expires in a daemon app? I think that I do not need to worry about that, but I just want to check with you on it. |
|
@guardrex : we released Microsoft.Identity.Web 1.2.0 today. If the token expires, Microsoft.Identity.Web (via MSAL.NET) will renew it. So no worries about that |
|
@jmprieur ... Awesome! ... Thanks ... ok ... I'll rework that bit then and ping u back next week (by Tuesday morning). I'll put the approach into a comment here to make it quick for you to inspect. cc: @captainsafia ... TL;DR ... The final bit for 5.0 WASM security updates here should be done Monday/Tuesday. @jmprieur will 👁️ a piece of this first to make sure that I'm doing good things with the hosted server API AAD group policies+Graph SDK/API piece ... the very last bit that needs work here 😅. After I have that resolved (and make a few other nit updates), I'll ping u. This PR has all of the remaining 5.0 WASM security work AFAIK. In fact AFAIK, this PR will wrap up ALL of the major Blazor 5.0 updates† 🎉🎈🍾. †But we will have to wrap up the component integration PR (dotnet/AspNetCore.Docs #19887), which is stuck until I get PU assistance with a couple of nits on it. |
|
@guardrex : what I don't fully understand is why you don't start from a project generated with Then for the groups, did you manage the overflow? |
|
@jmprieur ... This is a special case scenario for WASM hosted-generated apps ( Yes! on handling the presence of a ... and btw --- Javier and Safia ... and perhaps more PU folks ... will put an 👁️ on everything before we hit 5.0 GA. This won't be the last review of this, so we might make further changes. I'm just trying to get the draft coverage in place, and then we can take it from there. |
|
@captainsafia ... I think we're ready here. I've looked over the Graph API/SDK docs again this morning. I reverted the code on this PR back to making the WRT Javier's Graph code, that's on the PR. That code has been placed into a new Graph API topic. That code is also used in the AAD groups and roles for the Graph SDK approach in the client-side app. I've added the VS NOTE that DR recommends for 5.0, which we can remove later when VS releases (I'll open a tracking issue so that I don't forget). The wording of this NOTE probably needs a bit of help. You'll see these NOTEs at the tops of the Standalone and Hosted AAD topics. He said 'organization' account, so I assumed that he means multi-tenant apps created by VS are ok (i.e., B2C). If not tho, let me know 👂, and I'll add the NOTE to the Standalone and Hosted AAD B2C topics. AFAIK, we're sticking to the plan to have a final Javier (+probably others) review everything prior to GA from the live preview topics. |
captainsafia
left a comment
There was a problem hiding this comment.
Not done with the review but figured I'd post what I have at the moment. Will circle back with more feedback later.
|
Thanks for your help @jmprieur ... I think we're ready to move forward here. This content and these examples will be reviewed again by Javier (and others) later but prior to GA, so we'll fix them up further from here. btw --- I did notice one thing in passing when I was looking at the Groups sample that you cross linked. The example has app settings for the group memberships that say ...
Focusing on the remark "copied from Azure Portal" from the file, I don't think those are in the portal, nor are they published anywhere in Azure docs that I can find. I've tried a few times to track them down, including speaking with Kyle Marsh on #18924. I never found them, so we published them over here at ... I don't think this is the best spot for these. I think they should be in the Azure docs, but I'm not sure how to address it further. Let me know if you think I should take some additional action on it. |
I'll wait until ur done and then resolve everything at once. |
|
@captainsafia ... Looks good thus far. I'm going to go ahead and merge now and take live to get us beyond half-baked 5.0 preview topics. I intend to go over it all again by the end of this week and probably make some further nit updates. FYIs on the latest updates:
I have one ❓ on the code that bugs me ... In the new Graph API topic, public static IServiceCollection AddGraphClient(
this IServiceCollection services, params string[] scopes)builder.Services.AddGraphClient("https://graph.microsoft.com/User.Read");However, new AccessTokenRequestOptions()
{
Scopes = new[] { "https://graph.microsoft.com/User.Read" }
});I wish it could be refactored so that |
Fixes #20144
Fixes #19503
Internal Review Topic