-
Notifications
You must be signed in to change notification settings - Fork 37
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
Missing details in documentation on how to connect from PowerShell #104
Comments
We figured out how to get the AAD token and get it to connect 🥳 . I do not know if this is the preferred way or something that does not or does belong in this repo, maybe we can get the correct token through Get-AzAccessToken as well, I have not yet investigated. I think something on this topic would be nice to have in the documentation, I can add a suggestion, I leave it here at least for reference. I have not described the inputs in details, but at least it gives a hint on how to get the correct ServiceFabric Token. I do find the flow in Az somewhat more streamlined, perhaps it is possible to do something similar with a command that wraps the below Invoke-RestMethod to make it more clear how to connect?
|
Figured out how to get the same token through the Az commands too (when we had the Az context set), one issue is that we have to use the GUID where it wants the URL, which is a bit confusing, but the audience in the token has to be a GUID representing the app registration.
|
Hi @bjartwolf. We have tried both approaches and they do not work for us. Does anybody else have any suggestions? Thanks. |
Describe the bug
Maybe an alternative title could be - how to connect given that I have the Az-Context with permissions to manage the cluster?
I am trying to connect from an Azure Automation account in a similar fashion to Az.ServiceFabric, but have not been successful following the documentation. The Az.ServiceFabric command will only update services made with ARM templates, so I am trying my luck using this library.
Using Az.ServiceFabric
we can connect to Service fabric from Azure Automation accounts by setting the Az context and then running commands.
I am trying to use this package from Azure Automation and connection following Connect-SFCluster, but struggling to figure out how to make it work in a similar fashion.
I have tried to connect using
but it fails with
I have also tried supplying "the AAD Token" as mentioned in the documentation, but I am not sure which excact token this is, scope etc, so all my attempts have failed. Since I was already connected with az I was hoping to use
Get-AzAccessToken
and supply it directly as mentioned here.For example, I have tried with
. The token I get back looks OK, but it gives
To Reproduce
Create an Azure Automation account with a Runbook and a Service Fabric cluster.
Try to connect with the
Connect-SFCluster
command.Expected behavior
Expecting to connect to the cluster.
The text was updated successfully, but these errors were encountered: