Add AppclientID and scopes login wts
how to add appClientID and Scopes Login WTS for OneDrive Service
You can use the Forced Login or Optional Login template to authenticate the user and get data from the Microsoft Graph. The generated code contains instructions on how to register the application. You can find more info on https://github.com/microsoft/WindowsTemplateStudio/blob/dev/docs/UWP/services/identity.md
Then the ClientID of the App and scopes where it would be implemented. I downloaded the Azure sample
api has used microsoft. Identy.client, Microsoft. Graph.service and OnedriveService
've been selling the example I downloaded into Azure by looking at the example I've seen that in the call for authentication comes the scopes code. the doubt is that part of the OnLOggedIn code I have to introduce scopes , also example I have seen this code that goes intinialize();
PublicClientApp = PublicClientApplicationBuilder.Create(ClientId) .WithAuthority("https://login.microsoftonline.com/common") .WithLogging((level, message, containsPii) => { Debug.WriteLine($"MSAL: {level} {message} "); }, LogLevel.Warning, enablePiiLogging: false, enableDefaultPlatformLogging: true) .WithUseCorporateNetwork(true) .WithRedirectUri(Constant.PublicClientRedirectUri) .Build();
Not sure what's the sample your looking at, but you can use WTS Templates for "Forced Login" or "Optional Login" to set this up. The scope is passed as a parameter for getting the authenticatication token on user login.
_authenticationResult = await _client.AcquireTokenInteractive(_graphScopes)
.WithAccount(accounts.FirstOrDefault())
.ExecuteAsync();
Suspect this is an opportunity for providing clearer documentation in this area. Or pointing to existing docs if they exist.
🦙 @mrlacey I know they're still in preview, but we have the Graph Controls in the WCT as well. Is this a common scenario/ask you see for Graph integration in WTS?
Maybe we should figure out a plan for integration in the future?
🦙 @mrlacey I know they're still in preview, but we have the Graph Controls in the WCT as well. Is this a common scenario/ask you see for Graph integration in WTS?
Maybe we should figure out a plan for integration in the future?
I've created #3812 to track this and keep discussions separate.
@Javier118, I went through the docs and added a few more links. Identity is a complex topic though, what exactly is your scenario and where are you having problems? A repro project would also help to understand the issue.
search for OneDrive's ejemplo for MSA account.
@Javier118, we need more information to look into this. Could you share a link to the sample? What's the exact problem you are facing? Happy to answer questions in spanish or other languages too.
Necesitamos más información para mirar esta issue. Puede darnos un enlace al ejemplo que menciona? Cuál es el problema que está encontrando? Estamos encantados de contestar preguntas en español u otros idiomas.