Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Azure OAuth Token functions include:

  • acquireAzureOAuthToken
  • acquireAzureOAuthTokenCustomAuthority

acquireAzureOAuthToken

Contacts Azure to set up an OAuth Token based on the stated parameters.

Code Block
AzureOAuthToken acquireAzureOAuthToken( 
string tenantID, 
string resourceID, 
string clientID, 
string certificate, 
string certifcatePassword )

Parameters

ParameterDescription

tenantID

The Tenant ID is a GUID for your instance, or domain.

resourceID

The Resource ID is the App ID uri of the Azure application that you want to receive an OAuth Token for.

clientIDAlso known as an Application ID, a GUID that identifies the Azure application that is requesting the OAuth Token.
certificateThe full path
to a local keystore
and filename to the certificate. Must be set up on the EC that the workflow is running on.
certificatePasswordThe password to the
keystore
certificate.

Returns

An AzureOAuthToken UDR, or an exception if the parameters/credentials were incorrect.


Info
titleExample

AzureOAuth.AzureOAuthToken = AzureOAuth.acquireAzureOAuthToken("733f2c27-a0ca-45e1-a3b7-014bd4518ea3", "https://storage.azure.com/", "69bca157-2362-4ca7-adf3-6a26f6bd842f", "/opt/azure/certificate/appaccesscert.pfx", "c039d2b9-3aaa-47fd-8414-732249a94a65"verysecretpass");


acquireAzureOAuthTokenCustomAuthority

Contacts Azure to set up an OAuth Token based on the stated parameters with authorityHost.

Code Block
AzureOAuthToken acquireAzureOAuthToken( 
string tenantID, 
string resourceID, 
string clientID, 
string certificate, 
string certifcatePassword,
string authorityHost )

Parameters

ParameterDescription

tenantID

The Tenant ID is a GUID for your instance, or domain.

resourceID

The Resource ID is the App ID uri of the Azure application that you want to receive an OAuth Token for.

clientIDAlso known as an Application ID, a GUID that identifies the Azure application that is requesting the OAuth Token.
certificateThe full path and filename to the certificate. Must be set up on the EC that the workflow is running on.
certificatePasswordThe password to the certificate.
authorityHostThe URL for the directory that Microsoft Authentication Library will request tokens from.

Returns

An AzureOAuthToken UDR, or an exception if the parameters/credentials were incorrect.


Info
titleExample

AzureOAuth.AzureOAuthToken = AzureOAuth.acquireAzureOAuthToken("733f2c27-a0ca-45e1-a3b7-014bd4518ea3", "https://storage.azure.com/", "69bca157-2362-4ca7-adf3-6a26f6bd842f", "/keystores/azureKeystoreopt/azure/certificate/appaccesscert.pfx", "verysecretpass", "https://login.microsoftonline.com/");