Timeline for How to get cookies after obtaining Azure AD access token to SharePoint Online
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 12, 2018 at 17:45 | comment | added | Steve | Here's my code: using (SP.ClientContext context = authenticationManager.GetAzureADNativeApplicationAuthenticatedContext( siteUrl, clientId, redirectUrl, azureAdTokenCache)) { context.Load(context.Web); context.ExecuteQueryWithRetry(); } | |
Sep 12, 2018 at 17:44 | comment | added | Steve | What advantage is there to using the PnP core component if I am already using ADAL? Does it allow me to use authentication cookies instead of an access token? I installed the SharePointPnPCoreOnline NuGet package, but didn't have any success in using it. I kept getting a 403 error. | |
Sep 11, 2018 at 16:16 | comment | added | sssreddy | See my updated answer. You can use Pnp core component that should allow to do browser popup which should support authentication even when MFA is enabled. | |
Sep 11, 2018 at 16:14 | history | edited | sssreddy | CC BY-SA 4.0 |
Modified answer based on new comments.
|
Sep 11, 2018 at 16:07 | comment | added | Steve | My application is a desktop app that can be used by different tenants. So users will need to login somehow and authorize the app to access SharePoint. I have already setup an Azure App registration for this. | |
Sep 11, 2018 at 16:02 | comment | added | sssreddy | The above code does not use user credentials. It uses client id (app id) and client secret and runs in App-Only context. Please refer to this link for more information docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/… . | |
Sep 11, 2018 at 15:54 | comment | added | Steve | Also, how does it handle MFA? Does it open a browser window like ADAL does? | |
Sep 11, 2018 at 15:43 | comment | added | Steve | What about federated accounts? | |
Sep 11, 2018 at 13:37 | comment | added | Derek Gusoff | This approach will work with MFA enabled. | |
Sep 10, 2018 at 21:42 | comment | added | Steve | Well, I decided to use ADAL so that I could handle MFA. At the time, it seemed to be the best choice so I went with it. As I said, it is working for me with the exception of accessing URLs directly. | |
Sep 10, 2018 at 21:12 | history | answered | sssreddy | CC BY-SA 4.0 |