AADInstance null in CSP and CPV examples
Overview
Samples don't work out of the box even when populating App.config with valid parameters
Reproduction
Create App Registration in a Patrner tenant using the following script: https://gcits.com/knowledge-base/how-to-connect-to-delegated-office-365-tenants-using-the-secure-app-model/
Clone repo, plugin parameters returned from script into App.config
Expected Behavior
The application should not throw an except
Actual Behavior
Exception is thrown because AADInstance variable is null
Possible solutions
Change the following lines from
private static readonly string AADInstance = ConfigurationManager.AppSettings["AADInstance"];
to
private static readonly string AADInstance = ConfigurationManager.AppSettings["ida:AADInstance"];
https://github.com/microsoft/Partner-Center-DotNet-Samples/blob/007fec51341363ecf54f82fcf732186265f7f452/secure-app-model/keyvault/CSPApplication/Program.cs#L38
https://github.com/microsoft/Partner-Center-DotNet-Samples/blob/007fec51341363ecf54f82fcf732186265f7f452/secure-app-model/keyvault/CPVApplication/Program.cs#L26