App key and secret for connector in unificationengine - unificationengine

What has to be given as values for "app key" and "app secret" if I need to add smtp connector for an app in Unificationengine? From where can I get those values?

If the app does not have any key and secret, you can just give them as "no_key" and "no_secret".
Please check the following part of the documentation in https://developer.unificationengine.com

Related

error while trying to decrypt using azure vault certificate key: "Operation returned an invalid status code 'Forbidden'"

I am trying to decrypt a encrypted string through C# code and azure key vault certificate key, the encryption part works fine but while decrypting, an exception occurs saying : "Operation returned an invalid status code 'Forbidden'", "Operation decrypt is not permitted on this key."
I have allowed all the permissions while registering this to Azure AD "App registrations" option from the AD blade. Is there any other place where I need to add any more permissions. Have followed this article to setup the Certificate and association with AD.
A line of the code I am using for decryption:
var decryptedData = kv.DecryptAsync(key.Key.Kid,JsonWebKeyEncryptionAlgorithm.RSAOAEP, encryptedTextNew).GetAwaiter().GetResult();
If any one has done this, please write back in the comment, will be of great help.
Maybe my situation is difference, but I'm going to drop some detail here just in case someone runs into the same problem.
I created a certificate (note: a certificate, not a key) on Azure Key Vault UI and used it for encrypt/decrypt and got the Operation returned an invalid status code 'Forbidden' error.
I tried to create a new certificate but this time I checked all the Advanced Policy Configuration options (you should only check the options you need though) and the new one worked for me:
Operation returned an invalid status code 'Forbidden'
As I have tested, It seems that you do not configure the Access Policy in Key Vault for your application, to access keys or to process encryption/decryption.
Also, please have a check that if you add the role assignments of app registered to azure keyvault.
For more details, you could refer to this article which I have a test and it works fine.
This error also occurs if you try to use this kind of certificate in a Logic app with AS2Decode.
The error you will get then is:
Integration account operation failed with status code: Forbidden and
error KeyVaultOperationFailed : Communication with key vault
'..........KeyVault' failed. Please authorize logic apps to perform
operations on key vault by granting access for the logic apps service
principal '7cd684f4-8a78-49b0-91ec-6a35d38739ba' for 'list', 'get',
'decrypt' and 'sign' operations.
Thank you for this solution!
I had the same issue. Make sure that during certificate upload or generation, you set the Data encipherment option in Advanced Policy Configuration. This can only be done during initial set-up. Changing it later does not work.
Advanced Policy Configuration

B2C published scopes - "No identifier URI has been provided"

I'm trying to set this up but when going to Published Scopes tab for the client app I have created I am unable to configure as am receiving this message "No identifier URI has been provided", can anyone advise pls?
As #Chris Padgett said, if it's client app, you should configure "API access" rather than "Published scopes" to grant a client app permissions. For more details, you can refer to https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-access-tokens#grant-a-native-or-web-app-permissions-to-a-web-api. Hope it will be helpful!

Access denied linking variable group to key vault in VSTS

When I try to link a variable group to key vault in VSTS, every time I select my endpoint, it tells me:
"Specified Azure endpoint needs to have "Get, List" secret management permissions on the selected key vault. Click "Authorize" to enable VSTS to set these permissions or manage secret permissions in Azure portal."
It makes no sense. That specific endpoint has Get and List for secrets, keys, certificates. The endpoint is using the correct Service Principal Client ID- I know because I pulled its corresponding app registration up in Azure by searching with that ID. And the app registration is specifically listed in the key vault's Access policies, with the correct permissions.
Trying to click "Authorize" in VSTS just give me
"Resource not found for the segment 'DirectoryDataService.getServicePrincipalsByAppIds'. For troubleshooting refer to https://go.microsoft.com/fwlink/?linkid=835898"
and the endpoint is broken until I re-verify it.
I'm kind of at my wit's end here- everything is set exactly as https://learn.microsoft.com/en-us/vsts/build-release/concepts/library/variable-groups?view=vsts says it should be.
Edit: Turns out the Azure tried to add the app reg as a person instead of an app when I listed it in the ARM template by object ID (app ID most definitely does not work there). So now I just need to figure out how to add it as an application in the ARM template...
Edit Edit: Soooo... the Object ID the Azure Portal shows for an App Registration? That's not the Object ID the ARM template wants. It wants the... I'm not sure what you'd call it. In Powershell, you use it with -Object ID, but when you list the properties, it's under "Id". Whatever. To get it, you run
Get-AzureRmADServicePrincipal -SearchString "[your-app-reg-name]"
And it shows up under Id. That's what you want to use as an object ID in your ARM template.
According to the error Resource not found for the segment 'DirectoryDataService.getServicePrincipalsByAppIds, the issue seems more related to Azure side.
To access azure-keyvault you need four things :
- clientId = "<client id of your application registed on Azure AD>";
- domain = "<your talnet id>";
- secret = "<client key of your application registed on Azure AD>";
- subscription = "<your subscription id>";
Then these will combine ApplicationTokenCredentials, finally Authorize to KeyVaultClient . Suggest you take a look at this question: Azure keyvault client 1.0.0 initiate client
Besides also double check/confirm the specific endpoint has Get and List for secrets, keys, certificates.

Upload cloud service certificate from keyvault

I have uploaded the SSl certificate to keyvault. Now I wanted to upload this certificate to my Cloud service
With this API I am able to access the Cert from keyvault
GET https://{vaultBaseUrl}/secrets/{secret-name}/{secret-version}?api-version={api-version}
But to upload certifcate, I need the password too.
"path": "subscriptions/%sub_Id%/resourceGroups/%rg_Name%/providers/Microsoft.ClassicCompute/domainNames/%cloudService_Name%/servicecertificates/SHA1-%THUMBPRINT%",
"body": {
"thumbprintAlgorithm": "SHA1",
"thumbprint": "%THUMBPRINT%",
"data": "%base64encodedcert%",
"certificateFormat": "pfx",
"password": "password" << this is in plain text I believe
}
How to get the password from keyvault or upload service certificate without password or with secret URI ?
When you need to pass a secure value (like a password) as a parameter during deployment, you can retrieve the value from an Azure Key Vault. You retrieve the value by referencing the key vault and secret in your parameter file. The value is never exposed because you only reference its key vault ID. You do not need to manually enter the value for the secret each time you deploy the resources.
For more details, refer to this documentation. Use Key Vault to pass secure parameter.
Also, check the Azure Key Vault REST API reference for examples.

Client ID for Project Oxford Speech API

I'd like to test Microsoft Project Oxford Speech recognition API, but I don't know where or how to get the client_id.
I'm trying to test Search API. First, I'm trying to get a token to use the service:
curl -d -i "https://oxford-speech.cloudapp.net/token/issueToken?grant_type=client_credentials&client_id=123&client_secret=456scope=https%3A%2F%2Fspeech.platform.bing.com"
{ "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key." }
I have primary and secondary keys, but I can't find client_id. Can someone help?
See here
// Note: Sign up at http://www.projectoxford.ai to get a subscription key. Search for Speech APIs from Azure Marketplace.
// Use the subscription key as Client secret below.
Authentication auth = new Authentication("Come up with a short ClientId", "Client Secret");
More instructions here http://www.projectoxford.ai/doc/general/subscription-key-mgmt
goto the following link Subscribe to speech control and subscribe to speech recognition control...
register a new app using this link and here you can give the CLIENT ID of your choice which will be later used in the app..
finally goto the following link [www.microsoft.com/cognitive-services/en-us/subscriptions] sign in with a Microsoft account and find subscription key for any any api you wanna use and use this key as CLIENT SECRET
Hope this will help as I have tested this and it works perfectly for me...
third link is in brackets as i wasn't allowed more than 2 links...
After you signed up for the Speech API, you can view your subscription keys using this link: https://www.microsoft.com/cognitive-services/en-us/subscriptions.
Authentication auth = new Authentication("Come up with a short ClientId", "Client Secret");
In your code, DO NOT come up with a short ClientId. Just replace "Come up with a short ClientId" with the first key you find on the subscription page and replace "Client Secret" with the second key you find on the subscription page.

Resources