|
| 1 | +# Microsoft Partner Center |
| 2 | +The Partner Center API helps Cloud Solution Provider (CSP) partners integrate their existing CRM or billing software with the Microsoft systems that manage customer accounts, place orders, manage subscriptions, and handle support requests. |
| 3 | + |
| 4 | +## Publisher: Oleksii Skirko | Innoware |
| 5 | + |
| 6 | +## Prerequisites |
| 7 | +You will need the following to proceed: |
| 8 | + |
| 9 | +- A Microsoft PowerApps or Microsoft Flow plan with custom connector feature |
| 10 | +- Access to Microsoft Partner Center with appropriate permissions to call API functions |
| 11 | +- The Power platform CLI tools |
| 12 | +- AAD Application |
| 13 | + |
| 14 | +Since the APIs used by the connector are secured by Azure Active Directory (AD), we first need to set up a few things in Azure AD for connector to securely access them. After this setup, you can create and test the connector. |
| 15 | + |
| 16 | +### Azure AD Application |
| 17 | +Since the connector uses OAuth as authentication type, we first need to register an application in Azure AD. This application will be used to get the authorization token required to invoke rest APIs used by the connector on user's behalf. You can read more about this [here](https://docs.microsoft.com/en-us/partner/develop/api-authentication#application-and-user-access). Please use **Application and user access section** in this link. For redirect URI, use "https://global.consent.azure-apim.net/redirect". For the credentials, use a client secret (and not certificates). **Remember to note the secret down**, you will need this later and it is shown only once. |
| 18 | + |
| 19 | +### Install paconn |
| 20 | +- Install Python 3.5+ from [https://www.python.org/downloads](Python downloads). Select the Download link on any version of Python greater than Python 3.5. For Linux and macOS X, follow the appropriate link on the page. You can also install using an OS-specific package manager of your choice. |
| 21 | +- Run the installer to begin installation and be sure to check the box 'Add Python X.X to PATH'. |
| 22 | +- Make sure the installation path is in the PATH variable by running: |
| 23 | +`python --version` |
| 24 | +- After python is installed, install `paconn` by running: |
| 25 | +`pip install paconn`\ |
| 26 | +If you get errors saying 'Access is denied', consider using the `--user` option or running the command as an Administrator (Windows). |
| 27 | +You can find more details regarding `paconn` by following this [link](https://docs.microsoft.com/en-us/connectors/custom-connectors/paconn-cli) |
| 28 | + |
| 29 | +## Supported Operations |
| 30 | +The connector currently supports the following operations: |
| 31 | +### [Get Invoices](https://docs.microsoft.com/en-us/partner-center/develop/get-a-collection-of-invoices) |
| 32 | +Retrieves a collection of the partner's invoices. |
| 33 | + |
| 34 | +### [Get Customers](https://docs.microsoft.com/en-us/partner-center/develop/get-a-list-of-customers) |
| 35 | +Gets a collection of resources that represents all of a partner's customers. |
| 36 | + |
| 37 | +### [Get Subscriptions](https://docs.microsoft.com/en-us/partner-center/develop/get-all-of-a-customer-s-subscriptions) |
| 38 | +Gets a collection of a customer's subscriptions. |
| 39 | + |
| 40 | +### [Get customer orders](https://docs.microsoft.com/en-us/partner-center/develop/get-all-of-a-customer-s-orders) |
| 41 | +Gets a collection of all the orders for a specified customer. |
| 42 | + |
| 43 | +### [Get customer details](https://docs.microsoft.com/en-us/partner-center/develop/get-a-customer-by-id) |
| 44 | +Gets customer's details from Business and Company profiles |
| 45 | + |
| 46 | +## Deployment Instructions |
| 47 | +Add your Application ID to clientId property of `apiProperties.json` file.\ |
| 48 | +Run the following commands and follow the prompts:\ |
| 49 | +`paconn create --api-def apiDefinition.swagger.json --api-prop apiProperties.json --secret <client_secret>` |
| 50 | + |
0 commit comments