zincarla / adobeuminterface Goto Github PK
View Code? Open in Web Editor NEWA PowerShell module for communicating with Adobe's User Management API
License: MIT License
A PowerShell module for communicating with Adobe's User Management API
License: MIT License
PowerShell core has improvements to Invoke-RestMethod that will allow parsing of HTTP headers. Better error handling from API error responses. Need to test current functionality in PowerShell core, then implement the headers variable to handle http error codes.
Any ideas? I believe I have followed the steps correctly.
Exception calling "SignData" with "3" argument(s): "Invalid algorithm specified.
"
At C:\Program Files\WindowsPowerShell\Modules\AdobeUMInterface\AdobeUMInterface.psm1:401 char:5
$JWTSig = ConvertTo-Base64URL -Item ($SignatureCert.PrivateKey.Si ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thank you for all of your great work as it has saved me considerable time. I have a need to only use pre-installed certificates rather than exported and i noticed in your code about a comment that you were unable to get the private key using PS certificate provider, cert:.
You can use the GetRSAPrivateKey method from System.Security.Cryptography.X509Certificates.RSACertificateExtensions to achieve this. I have tested the below code in my own project and it works. (hope the formatting comes out ok.)
function Get-CertPrivateKey
{
[cmdletbinding()]
Param
(
[Parameter(Mandatory = $true,ValueFromPipeline = $true,ParameterSetName="ByObject")]
[System.Security.Cryptography.X509Certificates.X509Certificate2]$Certificate,
[Parameter(Mandatory = $true,ParameterSetName="ByCertHash")]
[string]$thumbprint
)
if($PsCmdlet.ParameterSetName -eq "ByCertHash"){
$Certificate = Get-ChildItem cert: -Recurse | where-object{ $_.Thumbprint -eq "$thumbprint" } | Select-Object -last 1
}
$rsaKey = [System.Security.Cryptography.X509Certificates.RSACertificateExtensions]::GetRSAPrivateKey($certificate)
return $rsaKey
}
Hope it helps.
Current Line:
[ValidateScript({$_.Token -ne $null})]
Should Be:
[ValidateScript({$_.Token -eq $null})]
Function errored out on me until i changed that line. Function's purpose is to change $ClientInformation.Token from a $null value to the token generated by function.
Also thank you for this code! You saved me hours upon hours of work. You rule.
@zincarla the throttle code in the Get-AdobeUsers function doesn't work, because the values it's looking for never exist. I've implemented my own code, which seems to work. So submitted it via a Pull request.
I hope this is the right way, since this is my first contribution to Git!
BTW: been using your module for several months now with no issues, until Monday morning when I ran into the throttle issue. I guess Adobe changed something! In my case, pulling back c.4800 users, which seems to need about 24 page requests to complete. Now throttles every 6 page requests. So if you have less than 1200 users to pull back, you may never hit the issue.
Hey!
Thanks for the great powershell modul - Love the work!
I'm having some issues with creating a federated user.
I keep gettings this error:
errors : {@{index=0; step=0; message=Domain field only allowed for non-email user names; errorCode=error.command.domain.must_be_used_with_nonemail_username}}
The reques is like this: $Request = New-CreateUserRequest -FirstName "John" -LastName "Doe" -Email "[email protected]" -IDType federated -Domain domain.com
I have tried mulitple combations but i keep ending up with that error or another error.
Can you tell me if there is a bug? or I'm i doing it wrong? - I could not find an example on how to create a fredated user, even though a read the entire function in the modul.
Can you prove me with an example on how to create a federated user?
Hi,
I am running your script and so far all good.
But, when I try to run the Get-AdobeAuthToken -ClientInformation $ClientInformation -SignatureCert $SignatureCert
it gives an error about the Private Key being Null.
I know the cert has a private key as I can see in windows it says it does.
Any thoughts on what might be going on??
Cheers
If you have a sync on a schedule to automatically replicate an AD group, and the domain is unavailable, then this may wipe all users from Adobe as the script assumes all users deleted. Need to try-catch this.
Hi,
The function Get-AdobeUsers seems to be broken since 2-3 weeks now.
When trying to send a New-SyncADGroupRequest, I'm always receiving a Bad Request error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.