Get KnowledgeBaseAnswerDialog while querying to Azure Knowledge Base - c#

I am new to Azure Cognitive services. I have created an Azure functions(C#) which uses QuestionAnsweringClient.GetAnswers Methodtext to get the answers from Azure Knowledgebase
I would also need the List of prompts associated with the answer.
Can some one please help me on this issue ?
I referred KnowledgeBaseAnswerDialog Class but could not find any solution.

Related

Is there a better way to List Queues in an Azure Storage Account in C#?

I'm stuck trying to get all the queues in an Azure Storage Account in C#. I've been trying to use the API endpoint shown here:
https://learn.microsoft.com/en-us/rest/api/storageservices/list-queues1
But it seems to be extremely old. It doesn't support bearer tokens and instead requires a SharedKey, the code I found to generate a SharedKey is also very old and can be found here (in the sample application):
https://learn.microsoft.com/en-us/azure/storage/common/storage-rest-api-auth
Before I commit to this course of action, I wanted to ask if anyone knows any better/more up to date way to get a list of all the queues in a given Azure Storage Account?
You can use the Azure Storage Queues client library for .NET to perform management operations like these.
The QueueServiceClient class has a method GetQueues that will list all queues in an account, see the docs

Microsoft Graph - Allow User Access to Application / Service Principal

We are in the process of rolling out a major application to members of staff, it has been setup to use Azure AD/SSO and we currently have to manually set each user to have access to the application through Azure AD -> Applications -> Users. We have a small c# web application that we use to manage AD users are looking to use the new Microsoft Graph API to set users to allowed access when they are created but can't find the correct endpoint/api call to use.
We have tried the following but the documentation/errors returned are quite lacking.
https://graph.microsoft.com/beta/servicePrincipals
https://graph.microsoft.com/beta/groups/{id}/members
Which endpoint/api call should we use to accomplish this?
It looks like you are looking to try and set appRoleAssignments. This is currently only exposed on the Microsoft Graph /beta version. The /beta documentation needs a little love and attention as you've discovered. However this pretty much should work as it does in AAD Graph (so you could reference the AAD Graph API reference), but with the different root of https://graph.microsoft.com/beta. This blog post also has some examples https://blogs.msdn.microsoft.com/aadgraphteam/2014/12/12/announcing-the-new-version-of-graph-api-api-version1-5/.
Are there any specific challenges that you are facing? What operations and errors are you seeing?
Hope this helps,

Can we replace Azure Portal by our enterprise Client app to perform all tasks that we perform on azure protal

Does Azure offer full APIs to accomplish all tasks without opening azure portal.
I heard some REST APIs are available but not sure about their coverage.
My questions is can we replace Azure portal completely by our customized enterprise App which actually calls REST APIs provided by Azure.
here is Why I need this strange thing
We need this as our organization is developing a Internal Unified App to manage our resources on all three cloud Azure,AWS and Google Cloud from single point..
The answer to your question is yes. You can certainly do that. As Alex mentioned in his comments, take a look at Azure Service Management API to begin with.
However there are a few things I would like to point out:
As you know there are two portals right now (Live and Preview). Unfortunately both of these portals use different sets of API. Live one uses Service Management API and the Preview one uses Azure Resource Manager (ARM) API. So you have to make sure that you use both of these APIs in your application. Though Microsoft is pushing very hard to make all the APIs exposed through ARM API but there's still a lot of work that needs to be done.
Another thing I noticed is that at times documentation for REST API for certain services is missing though there are ways to find that information. Just keep that in mind if you're building support for these services and not able to find documentation.
I would suggest you start here: https://msdn.microsoft.com/en-us/library/azure/mt420159.aspx and then find out REST APIs for the services you're interested in supporting in your application.

Adding customer fields with the SalesForce Partner API

I am using the SalesForce Partner API, not the Enterprise API. I want to be able to programatically (C#) add a custom field to any object in SalesForce (as an External ID) so I can merge data from external systems into the SalesForce object. I know there is a way to do this with the MetaData API, but I've also seen a number of references that suggest it's possible through the Partner API, which would be far better because we don't need to spin up yet another API connection to achieve this.
There seems to be no information about this anywhere. I can't find anything on the SalesForce.com help website or anywhere else on the internet and although mentioned in other posts, it doesn't appear that anybody has posted information about how to do it, or not that I can find anyway.
Can anybody point me in the right direction? Some sample code or a link to an article somewhere describing how to do it?
Thanks very much.
Since you need to create a custom field - which is metadata - only Metadata API can help you.
I am not sure what you mean by "to spin up yet another API connection" - but you can use Metadata API in the same service IMHO. Just get the Metadata WSDL and consume it. All your other calls with the partner api remain the same.
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_calls_intro.htm
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_quickstart_java_sample.htm

Where do I obtain IssuerName and IssuerKey in Azure

I am following this tutorial:
It mentions that I should get the IssuerName and IssuerKey from the properties of my ServiceBus. There are no properties called IssuerName and IssuerKey when using VS2012 Server Explorer to examine my ServiceBus. When I use the online Azure management console and I click on Connection Information I only get a Connection string not the expected IssuerName and IssuerKey.
Where are these values? I am on the free trial, does that matter?
This is what I see.
http://lh3.googleusercontent.com/-Fj9_XtqozFU/VAX4tBSSBZI/AAAAAAACCcY/zpaGo5EPx9Y/w667-h519-no/Azure.jpg
Go to the CONFIGURE tab and you will see the Shared Access Policies. For the sake of a demo/sample, you can just use the RootManageSharedAccessKey. However, that is not a best practice. You should create shared access policies appropriate for the application, whether it be a client with Send permissions, a service with Send and Listen permissions, etc.
The sample/tutorial also has a bug in it (dated content for an older SDK). In the QueueConnector.cs file, the CreateNamespaceManager should call the CreateSharedAccessSignatureTokenProvider instead of the CreateSharedSecretTokenProvider.
BTW, you can also get these values from your connection string. You just have to extract them from the other values in the connection string.
EDIT
I checked that Microsoft Azure is moving authentication method from ACS to SAS for better performance and manageability, so removed ACS things from dialog for newly created servicebus. Seems that documentation is not yet changed.
To use with SAS, good reference is http://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-queues/ and more low-level approach is described in http://msdn.microsoft.com/en-us/library/dn205161.aspx page.
For more information about SAS (and old ACS), please see http://msdn.microsoft.com/en-us/library/dn170478.aspx
ORIGINAL BELOW
Please go to Azure Portal by web browser. You may find it.
There was a change recently where the associated ACS namespace is not automatically created for a new service bus namespace created via the portal. If you need ACS authentication, you need to create the namespace either via the Management API or Azure PowerShell. I have written up some explanation of this at: http://brentdacodemonkey.wordpress.com/2014/08/27/shared-access-signatures-with-azure-service-bus/

Categories

Resources