0

We currently have JFrog's Artifcatory as our repository tool of choice, with single-sign on using SAML and Azure Active Directory.

I have now also created a local AF repository for our PowerShell modules. This all works when I use an internal AF user, it works. To install a module I run something like:

$cred = Get-Credential #Your credentials for access to Artifactory
Install-Module MyModule -Repository "MyRepo" -Credential $cred

However, if I pass in credentials for my Azure AD user, I get

WARNING: Unable to resolve package source 'https://......'.

Which is not the "error" I was expecting but yeah, it'd need a token to proceed, not a regular credential.

Is there any way to be able to use PowerShellGet commands such as Install-Module with SAML authentication?

ScubaManDan
  • 809
  • 8
  • 22

1 Answers1

0

This is probably a permission issue. You can verify that the user you are trying to use have the proper permissions to access this repository in Artifactory. If the user does have permissions, can you reproduce this and attach the logs from the "artifactory.log"? This can help diagnose the issue.

Adi Vizgan
  • 279
  • 1
  • 12
  • The problem is that I don't know how to form the PSCrednetial object for the find-module's credential parameter. I can if it's an internal Artifactory user, which is a simple user and password. But we authenticate using Azure Active Directory and SAML. I have no idea how to even try to authenticate my AAD user, or even if it's possible. – ScubaManDan Sep 16 '19 at 13:23
  • This should not be different from an internal Artifactory user, since when you try to authenticate with a user (no matter if it's internal or from SSO) Artifactory should process the authentication request the same way, and even if it's an SSO user Artifactory will say if you have permissions or not. Try this out and if it fails attach the log here so we can see what the issue is. – Adi Vizgan Sep 18 '19 at 13:06
  • Thanks Adi. I don't have access to the logs. I'll get some help retrieving them and post here. – ScubaManDan Sep 20 '19 at 08:55