-
Notifications
You must be signed in to change notification settings - Fork 60
Is the PartnerCenter PowerShell module still maintained? #396
Comments
As mentioned in the readme:
While I don't have insider knowledge, this module has not received attention for a long time and likely will not. It still works for a lot of stuff. I recommend you do not use it and try to move your automation projects to the REST API. |
This module was never officially supported by MSFT. The only maintainers were MSFT employees who stopped maintaining it since they moved outside of MSFT or other teams that are outside of Partner Center area. Move to something else as @penicaudm suggested. |
So "PartnerCenterModule" was deprecated: And replaced with "PartnerCenter" that is abandoned: Now you can do some of the stuff by using "MSOnline" but it also deprecated: And replaced with "AzureAD" (Azure Active Directory V2) that is deprecated: And replaced with "Microsoft.Graph" that can give you 10% of what you need: So I see there are a few docs regarding preforming some example operations in C# and REST AP like this : I started converting the C# one to PowerShell Install-Package -Name 'Microsoft.Store.PartnerCenter' -SkipDependencies -Verbose -Scope CurrentUser
Add-Type -Path "$env:LOCALAPPDATA\PackageManagement\NuGet\Packages\Microsoft.Store.PartnerCenter.3.0.1\lib\netstandard2.0\Microsoft.Store.PartnerCenter.dll" -Verbose
Add-Type -Path "$env:LOCALAPPDATA\PackageManagement\NuGet\Packages\Microsoft.Store.PartnerCenter.3.0.1\lib\netstandard2.0\Microsoft.Store.PartnerCenter.Models.dll" -Verbose
Add-Type -Path "$env:LOCALAPPDATA\PackageManagement\NuGet\Packages\Microsoft.Store.PartnerCenter.3.0.1\lib\netstandard2.0\Microsoft.Store.PartnerCenter.Extensions.dll" -Verbose
$partnerOperations = # How to create this? [Microsoft.Store.PartnerCenter.IAggregatePartner]
$indirectResellerId = 'Tenant GUID'
# Create a filter.
$filter = [Microsoft.Store.PartnerCenter.Models.Query.SimpleFieldFilter]::new(
[Microsoft.Store.PartnerCenter.Models.Customers.CustomerSearchField]::IndirectReseller.ToString(),
[Microsoft.Store.PartnerCenter.Models.Query.FieldFilterOperation]::StartsWith,
$indirectResellerId
)
#<#
# Create an iQuery object to pass to the Query method.
$myQuery = [Microsoft.Store.PartnerCenter.Models.Query.QueryFactory]::Instance.BuildSimpleQuery($filter)
# Get the collection of matching customers.
$customersPage = $partnerOperations.Customers.Query($myQuery);
<# TBD
# Create a customer enumerator for traversing the customer pages.
$customersEnumerator = partnerOperations.Enumerators.Customers.Create(customersPage);
int pageNumber = 1;
while (customersEnumerator.HasValue)
{
# Work with the current page.
foreach (var c in customersEnumerator.Current.Items)
{
# Display customer tenant identifier and company name.
Console.WriteLine(string.Format("{0} - {1}.",c.Id,c.CompanyProfile.CompanyName));
}
# Get the next page of customers.
customersEnumerator.Next();
}
#>
} But I wasn't able to understand how to create the
Maybe we can convert this bit of code to PowerShell? or maybe it is possible to simply run Connect-PartnerCenter and extract it from the module context and just use it?Can someone help? |
Are you guys interested in a community maintained PartnerCenter module? Is there an interest in using or contributing to such module? |
@ili101 I'll admit building a module like this is beyond my programming ability. Rather than re-inventing the wheel can't we expand upon what has already been created as part of this project? Isn't that what GitHub is for? And it looks like there is a new PartnerCenter SDK 3.x that I assume has improvements we need. As @penicaudm and @slavizh advise, moving directly to the APIs is probably the best answer, and something for me to start digging into. |
@mprentice22153 Freaking Covid finely got to me, so wasn't available.
Exampleshttps://docs.microsoft.com/en-us/partner-center/develop/get-an-organization-profile # Get-PartnerOrganizationProfile with the dlls is one line:
$PartnerOperations.Profiles.OrganizationProfile.Get()
# Get-PartnerOrganizationProfile with REST:
$Response = Invoke-RestMethod -ContentType 'application/json;charset=utf-8' -Uri 'https://api.partnercenter.microsoft.com/v1/profiles/organization' -Headers @{
"Authorization" = "Bearer " + $AccessToken
'Accept' = 'application/json;charset=utf-8'
'MS-RequestId' = 'b85cb7ab-cc2e-4966-93f0-cf0d8377a93f'
'MS-CorrelationId' = '1bb03149-88d2-4bc2-9cc1-d6e83890fa9e'
}
$Response.Substring(1) | ConvertFrom-Json # They put a BOM in it, so strange. So in assume the easiest solution is to find someone to maintain this module as you mentioned. |
@ili101 Please contact me directly. I'm curious to understand this more and hopefully help with this. |
I took some time to write a readme and made the repo public https://github.com/ili101/PartnerCustomerCommunity. |
I'm asking this seriously. Is the module still maintained by anyone?
Looking at the issues that have been opened and closed over the past year, the only closed issues are those closed by GitHub community members. There are numerous open issues that have remained open and some include apparently simple issues to resolve. The PartnerCenter module version is 3.0.10 and was released on July 9, 2020, nearly 2 years ago.
Maybe the module is just so awesome that it hasn't needed an update in 2 years.
Maybe the module is outdated and there is a better way for us to get the data and functionality.
Maybe someone with insider knowledge can at least provide some information?
The text was updated successfully, but these errors were encountered: