Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell credentials. #15

Open
tmckean opened this issue Mar 22, 2024 · 6 comments
Open

Powershell credentials. #15

tmckean opened this issue Mar 22, 2024 · 6 comments

Comments

@tmckean
Copy link

tmckean commented Mar 22, 2024

When attempting to connect to the PowerArubaCL using the "Connect-ArubaCL" command, I'm immediately prompted with Powershell credentials. Where are these created? I've used my Aruba Central credentials, a local account, and few other combinations with no luck. I even tried to create one using "Get-Credential" within PS.

@alagoutte
Copy link
Contributor

Hi,

Do you have following the example :
https://github.com/PowerAruba/PowerArubaCL?tab=readme-ov-file#examples

@tmckean
Copy link
Author

tmckean commented Mar 22, 2024

Hi Thanks! I do. This is the example I was following to gain access. So it states to use your credentials for your Aruba Central account, but is it required to create some sort of an API role under the HPE / Central site? I am the primary on our organization's Central account and should have full read/write to anything, but when I enter my creds in the PowerShell popup window, it returns a 401 unauthorized. If I knew where to service those credentials, I could change the permissions necessary to make the credentials work.

I can say that your AOS Switching PS worked for me no issues... but that is not reaching out to the Central platform, so I'm at a loss on how to set these credentials.

Appreciate your help!

@alagoutte
Copy link
Contributor

alagoutte commented Mar 22, 2024

Hi Thanks! I do. This is the example I was following to gain access. So it states to use your credentials for your Aruba Central account, but is it required to create some sort of an API role under the HPE / Central site? I am the primary on our organization's Central account and should have full read/write to anything, but when I enter my creds in the PowerShell popup window, it returns a 401 unauthorized. If I knew where to service those credentials, I could change the permissions necessary to make the credentials work.

I can say that your AOS Switching PS worked for me no issues... but that is not reaching out to the Central platform, so I'm at a loss on how to set these credentials.

Appreciate your help!

Yes, need to create client_id (and secret) using Aruba Central / GreenLake portal... (i need to update screenshot!)

@Grendel242
Copy link

Grendel242 commented Mar 28, 2024

When I use the connect-ArubaCL I am repeatedly presented with the following error. I have generated multiple tokens to try a different client ID, but I receive the same error each time. I'm entering my COP login credentials.

It looks like this is for Central Cloud, any reason it wouldn't work for Central On Prem as well? We leverage both.

Any assistance is appreciated.

WARNING: The Aruba Central API sends an error message:
WARNING: Error description (code): (400)
WARNING: Error details: {"extra":null,"message":"Invalid client ID"}

Update: Did some more testing after posting this.

  1. Worked great on Central Cloud (nice work)
  2. Failed on Central on Prem, however I discovered it's the path back in thats blocked. I'll be working to open that up and then test again, but after the other tests, I'm feeling pretty confident it will work.

@alagoutte
Copy link
Contributor

Hi @Grendel242, i don't have COP... and can't try but welcome for PR for adding support

Actually, the "region" is hardcoded to list of Central Cloud => https://github.com/PowerAruba/PowerArubaCL/blob/master/PowerArubaCL/Public/Connection.ps1#L87

Need to add a way to add your COP url

@alagoutte
Copy link
Contributor

Hi Thanks! I do. This is the example I was following to gain access. So it states to use your credentials for your Aruba Central account, but is it required to create some sort of an API role under the HPE / Central site? I am the primary on our organization's Central account and should have full read/write to anything, but when I enter my creds in the PowerShell popup window, it returns a 401 unauthorized. If I knew where to service those credentials, I could change the permissions necessary to make the credentials work.

I can say that your AOS Switching PS worked for me no issues... but that is not reaching out to the Central platform, so I'm at a loss on how to set these credentials.

Appreciate your help!

You can look https://developer.arubanetworks.com/aruba-central/docs/api-gateway-creating-application-token

I will look for update...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants