Skip to content

Can't work out the documentation for adding a PnPCoreAuthentication provider #717

Answered by jansenbe
juliemturner asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @juliemturner ,

This sample https://pnp.github.io/pnpcore/demos/Demo.AzureFunction/README.html uses Azure V3 functions with certificate based auth via the X509CertificateAuthenticationProvider provider but your code is almost OK as well, the issue your seeing comes from the fact that you've not connected a site configuration with the auth provider. Can you try something along these lines and see if that works for you:

// Add and configure PnP Core SDK
builder.Services.AddPnPCore(options =>
{
    // Add the base site url
    options.Sites.Add("Default", new PnPCoreSiteOptions
    {
        SiteUrl = Environment.GetEnvironmentVariable("SiteUrl")
    });
});

builder.Services.AddPnPCoreAu…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@jansenbe
Comment options

@jansenbe
Comment options

@juliemturner
Comment options

@juliemturner
Comment options

@juliemturner
Comment options

Answer selected by juliemturner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants