Azure Function Sample, but with dynamic site url #733
-
Hey everyone, I've implemented an azure function based on this sample (https://github.com/pnp/pnpcore/blob/dev/samples/Demo.AzureFunction.OutOfProcess.AppOnly/Program.cs) but in my version i can't get the siteurl from the environmentvariables, but need it to be dynamic. The site I will work with will always be dynamic and be in the service bus message that triggers my function. I wonder what approach I should take to implement that. Any ideas and help/examples are appreciated! Cheers Richard |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
ok, was actually able to answer it myself, so I'll share this for anyone else maybe needing the same: instead of of
use
SiteUri needs to be of type Uri of course and you need to define a default authentication provider in program.cs/startup.cs
some of the lines from the sample where the "Default"-Service is created are now obviously redundant... still any feedback highly welcome if you have tipps or additions! |
Beta Was this translation helpful? Give feedback.
ok, was actually able to answer it myself, so I'll share this for anyone else maybe needing the same:
instead of of
use
SiteUri needs to be of type Uri of course and you need to define a default authentication provider in program.cs/startup.cs