sp-dev-docs
sp-dev-docs copied to clipboard
SharePoint PnP Sites Core library c# example is wrong
The method GetAzureADAppOnlyAuthenticatedContext is obsolete in latest version.
This line
using (var cc = authManager.GetAzureADAppOnlyAuthenticatedContext("https://contoso.sharepoint.com/sites/demo"))
Should be replaced by:
using (var cc = await authManager.GetContextAsync("https://contoso.sharepoint.com/sites/demo"))
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: e082eb56-fafb-9ef7-fadb-e0b90f5369a9
- Version Independent ID: 0f1a3528-3615-5722-2352-a1ad4622c244
- Content: Granting access via Azure AD App-Only
- Content Source: docs/solution-guidance/security-apponly-azuread.md
- Product: sharepoint
- GitHub Login: @VesaJuvonen
- Microsoft Alias: vesaj
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.