azure-api-apps

How to consume Azure REST API App with Azure Active Directory authorization On

北战南征 提交于 2019-12-01 14:37:21
I have deployed an API App to Azure, but I am having problems creating API Client if Authentication (with AAD) is set to ON. When I try to generate service client (when Authentication is OFF), then client code is generated (it's done with Autorest) and code is working, but when I switch Authentication ON (and Action to take when request is not authenticated is set to Login with Azure Active Directory ), then 1) service call returned 401 Unauthorized (without redirecting to AAD login page) 2) Then I tried to generate service client once more (from Project's context menu -> Add -> REST API

Authenticate to an Azure API App from Java

社会主义新天地 提交于 2019-12-01 11:23:08
问题 I have a similar issue to this post:Authenticate to Azure API App using ADAL but in my case I have a customer with a Java client hosted in JBoss who needs access to my API. The service is secured as 'Public (authenticated)' and I don't have any issues accessing it from a browser. I know that I can create an Azure API App Client in .net but I can't find any samples on how to authenticate from Java. Is this currently possible and if so does anyone have any samples or advice that would help? 回答1

Unable to use bearer token to access AAD-secure Web API

人走茶凉 提交于 2019-12-01 10:26:41
I have an API app secured with Azure AD (AAD). I also have an AAD application for a consuming application, and in the consuming application I have set up permissions to access the API app. I am able to get a token, but when I go to use the token, the API app doesn't seem to look at the Authorization header. It tries to log me in via web browser. My request looks like this: GET /api/ticketing/issueTopics HTTP/1.1 Host: <removed> Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc<rest is removed> Cache-Control: no-cache This is what my Fiddler looks like. The result I get in Postman is some MS

Authenticate to Azure API App using ADAL

依然范特西╮ 提交于 2019-12-01 07:12:09
问题 I have an Azure API App marked as "Public (authenticated)" and set up an Azure Active Directory identity in the associated gateway as detailed in Protect an API App. I then created a native application in the same Azure Active Directory Tenant and added permission to access the Gateway in the delegated permissions. Using ADAL and the following code, I'm able to successfully authenticate and get an access token, but I can't figure out how to use it to access my API app. string Tenant = "[xxx]

Unable to use bearer token to access AAD-secure Web API

做~自己de王妃 提交于 2019-12-01 06:30:46
问题 I have an API app secured with Azure AD (AAD). I also have an AAD application for a consuming application, and in the consuming application I have set up permissions to access the API app. I am able to get a token, but when I go to use the token, the API app doesn't seem to look at the Authorization header. It tries to log me in via web browser. My request looks like this: GET /api/ticketing/issueTopics HTTP/1.1 Host: <removed> Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc<rest is removed>

CORS headers missing when deployed on Azure Web App / Azure API

﹥>﹥吖頭↗ 提交于 2019-11-30 14:15:38
I have created an OWIN hosted WebAPI 2 . There's also a web app ( AngularJS ) that's using the API and acting as a client. I've added the necessary code for the CORS to the Startup.cs , and hosted it in local IIS on a port different than the client and confirmed that it fixes the Cors issue. Then, I deployed both apps to Azure (I've put both on the Azure as Web App, and I also tried putting the OWIN to the Azure API that is currently in preview) but - the preflight request now fails (no Access-Control-Allow-Origin present in the response). Q: Is there some specific of Azure I'm not aware of?

CORS headers missing when deployed on Azure Web App / Azure API

烈酒焚心 提交于 2019-11-29 19:50:52
问题 I have created an OWIN hosted WebAPI 2 . There's also a web app ( AngularJS ) that's using the API and acting as a client. I've added the necessary code for the CORS to the Startup.cs , and hosted it in local IIS on a port different than the client and confirmed that it fixes the Cors issue. Then, I deployed both apps to Azure (I've put both on the Azure as Web App, and I also tried putting the OWIN to the Azure API that is currently in preview) but - the preflight request now fails (no

Azure API Authentication

佐手、 提交于 2019-11-29 12:49:41
I am using Azure API's in C# code and used below libraries using Microsoft.Rest; using Microsoft.Rest.Azure.Authentication; using Microsoft.Azure.Management.DataLake.Store; using Microsoft.Azure.Management.DataLake.StoreUploader; using Microsoft.Azure.Management.DataLake.Analytics; using Microsoft.Azure.Management.DataLake.Analytics.Models; using Microsoft.WindowsAzure.Storage.Blob; To create connection with Azure, private static ServiceClientCredentials AuthenticateAzure(string domainName, string nativeClientAppCLIENTID) { // User login via interactive popup SynchronizationContext

Unable to get bearer token from Azure AD to use with API App

你说的曾经没有我的故事 提交于 2019-11-29 10:00:18
问题 I have an MVC application that needs to access private API App in Azure that is protected with Azure AD authentication. So I need to get Azure AD bearer token, transfer it into Zumo-Auth token and use it to access the API App. I'm going through this tutorial and everything is working fine until the point when I need to request the token from authContext . Here is the snippet of a code: var authContext = new AuthenticationContext( "https://login.microsoftonline.com/MyADDomain.onmicrosoft.com")

Azure - ADlsError / WebHDFS error while deleting ADLS file

↘锁芯ラ 提交于 2019-11-28 14:40:01
I am using C# for ADLS authentication and wants to do some file operation like delete, rename. Using below code for authentication and delete operation var context = new AuthenticationContext("https://login.windows.net/" + tenantId); ClientCredential clientCredential = new ClientCredential(appId, secretKey); var tokenResponse = context.AcquireTokenAsync("https://management.azure.com/", clientCredential).Result; var accessToken = tokenResponse.AccessToken; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Add("Authorization", "Bearer " + accessToken); client.BaseAddress = new