No description, website, or topics provided.
C#
Switch branches/tags
Nothing to show
Clone or download
Latest commit 83f46c5 Dec 3, 2015
Permalink
Failed to load latest commit information.
DataModels Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
Documentation Fixes to documentation. Nov 30, 2015
Properties Merged new RateCard sample; Moved Azure to now project; Nov 24, 2015
App.config Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
AuthorizationToken.cs Re-integrated vm scenario Nov 25, 2015
AzureRequestBuilder.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
AzureResourceManager.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
Constants.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
CredentialManager.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
Customer.cs Added stream processing; scenario now creates customer/order/vm Nov 25, 2015
LICENSE.md Merged new RateCard sample; Moved Azure to now project; Nov 24, 2015
Microsoft.Partner.CSP.Api.Samples.csproj Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
Microsoft.Partner.CSP.Api.Samples.csproj.user Re-integrated vm scenario Nov 25, 2015
Microsoft.Partner.CSP.Api.Samples.sln Re-integrated vm scenario Nov 25, 2015
OfferCatalog.cs Added stream processing; scenario now creates customer/order/vm Nov 25, 2015
Orchestrator.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
Order.cs Added stream processing; scenario now creates customer/order/vm Nov 25, 2015
Program.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
README.md Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
RateCard.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
Reseller.cs Re-integrated vm scenario Nov 25, 2015
Stream.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
Subscription.cs Merged new RateCard sample; Moved Azure to now project; Nov 24, 2015
Usage.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
User.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
Utilities.cs Restructured project; added copyright & intellisense comments; added … Dec 2, 2015
packages.config Merged new RateCard sample; Moved Azure to now project; Nov 24, 2015

README.md

Commerce-API-DotNet

These are samples in C# for using the commerce APIs for Microsoft Partner Center. These CREST APIs are documented at https://msdn.microsoft.com/en-us/library/partnercenter/dn974944.aspx.

A public forum for discussing the APIs is available at https://social.msdn.microsoft.com/Forums/en-US/home?forum=partnercenterapi.

Prerequisites

To update resources in a customer tenant or directory, an application must have a security principal. The principal can be created in every customer tenant, or can be created in the reseller tenant via a multi-tenant, native application. To ease the admistrative burden for the sample, the latter option is implemented. The steps are detailed in the prerequisite page.

The Create VM scenario will require user credentials at run-time. This user must be a member of the Admin Agents group in the reseller directory. To allow unattended operation, the sample application uses the Windows Credential Manager application to securely store the account and password of this user. It is recommended that a "service account" be created rather than storing an actual user credentials. The Credential Manager page includes steps for creating a stored credential.

App Configuration

The sample application has several configurable settings in the app.config file. Set the values as appropriate for your tenant.

Configuration Key Description
scenario The scenario to execute. A value of zero will run all scenarios.
AppId The id of the application registered in the Partner Center. This id is used to access the CREST APIs.
Key The key of the application registered in the Partner Center.
MicrosoftId The Microsoft Id of the reseller. Used to access CREST APIs.
DefaultDomain The default domain of the reseller in Microsoft Azure. (This is typically an "onmicrosoft.com" domain.)
ExistingCustomerMicrosoftId The Microsoft Id of a customer associated with the reseller. This is used in scenarios that require a customer id, such as GetSubscriptions and GetOrders.
AzureAppId The id of the multi-tenant application registered in the reseller directory that provisions resources in the customer tenant.
CredentialName The value of "Internet or network address" in Credential Manager that contains the service account credentials.