Partner-Center-PowerShell
Partner-Center-PowerShell copied to clipboard
How can I get through the Microsoft Partner Center Power Shell to extract the list of clients that have the delegated administration of the tenant and the clients in which I do not have the delegated administration of the tenant?
Feature Request
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I am always frustrated when [...]
Describe the solution you would like A clear and concise description of what you want to happen.
Describe alternatives you have considered A clear and concise description of any alternative solutions or features you have considered.
Additional context Add any other context or screenshots about the feature request here.
Here's how we do this:
connect-msolservice # Connect as yourself
connect-partnercenter $customers = Get-PartnerCustomer | Sort-Object -Property Name
foreach ($c in $customers) {
try { $null = get-msoldomain -tenantID $c.customerid -erroraction stop } catch { write-output "Unable to connect to $($c.Name) ($($c.customerid))" }
Typed that in by hand so I might be a little off but that will get you close. Any customer that you can't pull the domains for you don't have admin access.
Hello mprentice22153 first of all thank you for the answer. I am trying to put the command "connect-msolservice # Connect as yourself" from the Windows Power Shell and the system gives the following message: "The term 'connect-msolservice' is not recognized as the name of a cmdlet, function, file script or executable program. Check if you typed the name correctly or, if you included a path, Please check that this path is correct and try again. Online: 1 Character: 1
- connect-msolservice # Connect as yourself
- CategoryInfo: ObjectNotFound: (connect-msolservice: String) [], CommandNotFoundException
- FullyQualifiedErrorId: CommandNotFoundException " ¿ Do you know what can happen ?
Google the error and see why it is happening. You will also see that two lines of my response joined into a single line accidentally. I've given you the foundation, you should be able to solve the rest.
Hello mprentice22153 we have already connected with the Partner Center but I do not understand what lines I have to put to extract the client list that the delegated administration has. Can you tell us please?
Can someone help me with the query I have put in please?
This way worked for me:
$PartnerCustomerCompanyProfile = Get-PartnerCustomerCompanyProfile -CustomerId $PartnerCustomer.CustomerId
if (!$PartnerCustomerCompanyProfile.Email) {
'No permission'
}
I've recently discovered this which I believe is the correct solution: Get-PartnerCustomerManagedService -CustomerId <customerTenantID> |where {$_.GroupName -eq 'Office'} | select Name,ManagedServiceID
This provides the listing of services that can be managed, similar to what is seen in the UX.
A lot of this will change as everything moves towards Granular DAP which is in pilot and coming into Partner Centers soon.