Forum Discussion
Tommy-Johannessen
Aug 25, 2023Copper Contributor
Error when authenticating with Default Azure Credential (CSOM)
Before the summer break I used a code that we have developed to set up content on SharePoint sites though local host when running from Visual Studio. Then when I returned about a week later the code ...
- Oct 23, 2023then you will have to wait for MS reenabling SPO accepting 'user_impersonation' scope (there is a ticket already) 🙂
any other solution involves an app registration created
Tommy-Johannessen
Oct 23, 2023Copper Contributor
Thank you for the reply elnurrr,
One of the issues with this approach is that we some times use our kode to setup SharePoint lists and content types on sites, where we only have access to that specific site and a user (often with MFA).
The approach we used earlier allowed us to login with the user in Visual Studio and run the code on behalf of that user. Now that is not possible, just wanted to know if it was possible to achieve the same without making a resource in Azure.
But I will keep your answer in mind as a nice workaround when possible, thanks.
elnurrr
Oct 23, 2023Copper Contributor
then you will have to wait for MS reenabling SPO accepting 'user_impersonation' scope (there is a ticket already) 🙂
any other solution involves an app registration created
any other solution involves an app registration created
- Tommy-JohannessenOct 23, 2023Copper ContributorThank you for the help 🙂
Will use the workaround whenever possible, and wait patiently for them to reenable 'user_impersonation' for SPO- elnurrrDec 01, 2023Copper ContributorGot a response from Microsoft
"...
In May 2023, a pull request was merged to deny the use of the scope user_impersonation for all non first-party applications and some first-party applications.
This is a design change what was made to address security concerns, because this (user_impersonation) is an implicit (not explicitly granted) scope, and a token with this scope gains all the permissions that the user is granted in SharePoint.
...
"
Seems like the DefaultAzureCredential is not going to work 'by default' with SPO anymore