Class ClientConfiguration
The configuration of a client and methods to read and store the configuration in Azure storage as JSON
Inheritance
Inherited Members
Namespace:AzureFunctionsForSharePoint.Core
Assembly:AzureFunctionsForSharePoint.Core.dll
Syntax
public class ClientConfiguration
Properties
| Improve this Doc View SourceAcsClientConfig
This is the configuration for a client that is registered as an app and uses ACS for authorization
Declaration
public ACSClientConfig AcsClientConfig { get; set; }
Property Value
Type | Description |
---|---|
ACSClientConfig |
Remarks
These properties ware originally part of ClientConfiguration and this change breaks existing config files
ClientId
The id of the client. If you are using ACS, this should match the client id from a SharePoint add-in manifest.
Declaration
public string ClientId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CredentialedClientConfig
This is the configuration for clients that use real credentials provided by users at runtime. In these configurations the client and function app share the information required to encrypt and decrypt the connection information.
Declaration
public CredentialedClientConfig CredentialedClientConfig { get; set; }
Property Value
Type | Description |
---|---|
CredentialedClientConfig |
See Also
NotificationQueueName
Name of the queue to which notifications are set
Declaration
public string NotificationQueueName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ServiceBusConnectionString
Connection string to the service bus queue the client will use to receive event notifications
Declaration
public string ServiceBusConnectionString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceGetBootstrapManifest(String, String, String)
Loads an app manifest named bootstrapmanifest.json from the client config container. If none exists, returns an empty app manifest
Declaration
public static AppManifestBase GetBootstrapManifest(string clientId, string storageAccount, string storageAccountKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | clientId | The id of the client. This must match the client id from a SharePoint add-in manifest. |
System.String | storageAccount | Azure storage account name |
System.String | storageAccountKey | Azure storage account key |
Returns
Type | Description |
---|---|
IQAppProvisioningBaseClasses.Provisioning.AppManifestBase | An app manifest |
GetConfiguration(String)
Reads the config from Azure storage using the hosting app's ConfigurationManager.AppSettings
Declaration
public static ClientConfiguration GetConfiguration(string clientId)
Parameters
Type | Name | Description |
---|---|---|
System.String | clientId | The id of the client. This must match the client id from a SharePoint add-in manifest. |
Returns
Type | Description |
---|---|
ClientConfiguration | A ClientConfiguration object |
GetConfiguration(String, String, String)
Reads the config from Azure storage using the given storage account and account key
Declaration
public static ClientConfiguration GetConfiguration(string clientId, string storageAccount, string storageAccountKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | clientId | The id of the client. This must match the client id from a SharePoint add-in manifest. |
System.String | storageAccount | Azure storage account name |
System.String | storageAccountKey | Azure storage account key |
Returns
Type | Description |
---|---|
ClientConfiguration | A ClientConfiguration object |
GetStorageAccount()
Gets the storage account where the config is stored
Declaration
public string GetStorageAccount()
Returns
Type | Description |
---|---|
System.String | The Azure storage account name |
GetStorageAccountKey()
Gets the key to the storage account where the config is stored
Declaration
public string GetStorageAccountKey()
Returns
Type | Description |
---|---|
System.String | The Azure storage account key |
SetConfiguration(ClientConfiguration, String, String)
Saves a client config to Azure storage in a container named the same as the client id.
Declaration
public static void SetConfiguration(ClientConfiguration config, string storageAccount, string storageKey)
Parameters
Type | Name | Description |
---|---|---|
ClientConfiguration | config | A ClientConfiguration instance |
System.String | storageAccount | Azure storage account name |
System.String | storageKey | Azure storage account key |