Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelconan/uipath-googleservicetoken
Reusable UiPath components to authenticate with Google using Service Accounts for API operations
https://github.com/michaelconan/uipath-googleservicetoken
Last synced: 22 days ago
JSON representation
Reusable UiPath components to authenticate with Google using Service Accounts for API operations
- Host: GitHub
- URL: https://github.com/michaelconan/uipath-googleservicetoken
- Owner: michaelconan
- Created: 2023-08-22T14:15:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-07T15:24:52.000Z (about 1 year ago)
- Last Synced: 2023-10-07T16:27:12.082Z (about 1 year ago)
- Language: C#
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GoogleServiceAuth
Reusable activities to support authentication to Google APIs using service account context.
Developed as a [custom Code activity for UiPath Studio](https://docs.uipath.com/developer/docs/creating-activities-with-code).
Steps:
- Install Visual Studio with Desktop development tools
- Install .NET framework 4.6.1
- Create C# class library
- Target framework options did not show 4.6.1. Created library then modified `.csproj` framework manually.
- Write activity logic following template from UiPath documentation
- Build solution in Visual Studio to create `.dll` file
- Create `.nupkg` using [Visual Studio and the Nuget CLI](https://learn.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio-net-framework)
- Update project properties to include "Activities" within the ID
- Create `.nuspec` file using nuget CLI, then `.nupkg` file
- Load created `.nupkg` to Orchestrator or to local packages folder (`C:\Program Files\UiPath\Studio\Packages`)
- Install package from package manager## Alternatives
Rather than using this custom C# CodeActivity, a raw access token can be generated using `gcloud` ([docs](https://cloud.google.com/sdk/gcloud/reference/auth/print-access-token)) via PowerShell or Command Line:```shell
gcloud auth activate-service-account [email protected] --key-file=/path/key.json --project=PROJECT_ID
gcloud auth print-access-token --scopes=SCOPES
```_NOTE: The `--scopes` flag for `print-access-token` is not currently listed in the public documentation (as of October 2023), but is supported_