How to call this API from the back end of this web app sharing credential? They are on different Azure environment but on the same domain
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am not so into .NET and I am finding the following difficulies.
I have a use case similar to this one: How to get HttpClient to pass credentials along with the request?
Basically I have a .NET web application (on which users can log in) running in the Azure cloud (it is an application running into SharePoint, I don't know if it could be a relevant details).
Into the back end of this webapp I implemented an ApiController controller that have to call another second REST API.
This second API is running on another environment (it should be a machine on Azure) but both these environments should "share" credential in some way. I think that it is very important point, I try to explain the situation in practice:
I have my .NET web application running on an environment A. The user can log into this application inserting his credential.
On another environment B is running the API that the previous web application have to call. The endpoint is sometning like: *http://MY_MACHINE_NAME.westeurope.cloudapp.azure.com:8081/PI_WebAPI/API_TO_BE_CALLED (as you can see it runs on a azure VM).
The web app and the API run on two different environments in the but they share credentials (I don't know the details but it works in this way, I think that they should be on a same domain). The proof of this assertion is that if I call my API (from the browser) it ask me my user credential (in a borwser popup). But if I first log into my web application (running on the environment A) and then I call my API (running on the environment B) on another browser tab it directly access because it know that I am logged in the system.
What I have to do is allow the back end of my web application (running on the environment A) to call this API (running on the environment B) using the credentials of the logged user.
So I was trying to implement the previous post strategy.
I implemented my controller in this way:
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList2")]
public IHttpActionResult GetAooList2()
Console.WriteLine("INTO GetAooList2()");
string jsonRequest = urlBaseProtocolloApi + "/api/ProtocollaMail/GetListAOO";
var wi = (System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity;
var wic = wi.Impersonate();
..............................................................
..............................................................
..............................................................
return Ok("TEST");
My idea is to obtain the logged user credential and impersonate these credential before perform my call.
The problem is that when the Impersonate() method is performed I obtain the following exception:
System.InvalidOperationException: 'An anonymous identity cannot perform an impersonation.'
So I think that it can't retrieve the identity. Looking into the wi object (the one on which I call the impersonate() method) I found the IsAnonymous property setted to true and it seems to me that it is not containing info on the logged user.
As explained I am not into .NET and probably I am missing something, what?
Using this code what user am I tryng to impersonate?
I also tried to do it using this other implementation:
public class MailProtocolloController : ApiController
private String urlBaseProtocolloApi = "http://MY_MACHINE_NAME.westeurope.cloudapp.azure.com:8081/PI_WebAPI";
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList")]
public IHttpActionResult GetAooList()
string jsonRequest = urlBaseProtocolloApi + "/API_TO_BE_CALLED";
CredentialCache credCache = new CredentialCache();
credCache.Add(new Uri(jsonRequest), "NTLM", CredentialCache.DefaultNetworkCredentials);
HttpWebRequest spRequest = (HttpWebRequest)HttpWebRequest.Create(jsonRequest);
spRequest.Credentials = credCache;
spRequest.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
spRequest.Method = "GET";
spRequest.Accept = "application/json;odata=verbose";
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
...............................................................................
...............................................................................
...............................................................................
As you can see I am trying to retrieve the DefaultNetworkCredentials of my web app (that I expected to be the logged user credential that I should use to perform the call to my second REST API). But it is not working, infact doing in this way when this line is performed:
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
I obtain the following exception:
System.Net.WebException: 'The remote server returned an error: (401) Unauthorized.'
But I think that maybe it could be something near to "the good way" (using the NTLM protocol) because if instead to use the DefaultNetworkCredentials I manually set my credential in the code it works fine and I correctly obtain the REST API response.
I have done it in this way:
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList")]
public IHttpActionResult GetAooList()
Console.WriteLine("INTO GetAooList()");
string jsonRequest = urlBaseProtocolloApi + "/API_TO_BE_CALLED";
NetworkCredential myCreds = new NetworkCredential("MY_USERNAME", "MY_PSWD", "THE_DOMAIN");
CredentialCache credCache = new CredentialCache();
credCache.Add(new Uri(jsonRequest), "NTLM", myCreds);
//credCache.Add(new Uri(jsonRequest), "NTLM", CredentialCache.DefaultNetworkCredentials);
HttpWebRequest spRequest = (HttpWebRequest)HttpWebRequest.Create(jsonRequest);
spRequest.Credentials = credCache;
spRequest.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
spRequest.Method = "GET";
spRequest.Accept = "application/json;odata=verbose";
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
..........................................................................................
..........................................................................................
..........................................................................................
As you can see using this line:
NetworkCredential myCreds = new NetworkCredential("MY_USERNAME", "MY_PSWD", "THE_DOMAIN");
in which I am setting username, password and the DOMAIN (the web app and the API should run on different environments but on the same domain) it works fine and the API is correctly called.
Obviously I can not mock these information into my controller method code. I need a way to retrieve these credential info and use it.
Some idea? How can I do it? What am I missing?
c# .net azure httpwebrequest ntlm
add a comment |
I am not so into .NET and I am finding the following difficulies.
I have a use case similar to this one: How to get HttpClient to pass credentials along with the request?
Basically I have a .NET web application (on which users can log in) running in the Azure cloud (it is an application running into SharePoint, I don't know if it could be a relevant details).
Into the back end of this webapp I implemented an ApiController controller that have to call another second REST API.
This second API is running on another environment (it should be a machine on Azure) but both these environments should "share" credential in some way. I think that it is very important point, I try to explain the situation in practice:
I have my .NET web application running on an environment A. The user can log into this application inserting his credential.
On another environment B is running the API that the previous web application have to call. The endpoint is sometning like: *http://MY_MACHINE_NAME.westeurope.cloudapp.azure.com:8081/PI_WebAPI/API_TO_BE_CALLED (as you can see it runs on a azure VM).
The web app and the API run on two different environments in the but they share credentials (I don't know the details but it works in this way, I think that they should be on a same domain). The proof of this assertion is that if I call my API (from the browser) it ask me my user credential (in a borwser popup). But if I first log into my web application (running on the environment A) and then I call my API (running on the environment B) on another browser tab it directly access because it know that I am logged in the system.
What I have to do is allow the back end of my web application (running on the environment A) to call this API (running on the environment B) using the credentials of the logged user.
So I was trying to implement the previous post strategy.
I implemented my controller in this way:
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList2")]
public IHttpActionResult GetAooList2()
Console.WriteLine("INTO GetAooList2()");
string jsonRequest = urlBaseProtocolloApi + "/api/ProtocollaMail/GetListAOO";
var wi = (System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity;
var wic = wi.Impersonate();
..............................................................
..............................................................
..............................................................
return Ok("TEST");
My idea is to obtain the logged user credential and impersonate these credential before perform my call.
The problem is that when the Impersonate() method is performed I obtain the following exception:
System.InvalidOperationException: 'An anonymous identity cannot perform an impersonation.'
So I think that it can't retrieve the identity. Looking into the wi object (the one on which I call the impersonate() method) I found the IsAnonymous property setted to true and it seems to me that it is not containing info on the logged user.
As explained I am not into .NET and probably I am missing something, what?
Using this code what user am I tryng to impersonate?
I also tried to do it using this other implementation:
public class MailProtocolloController : ApiController
private String urlBaseProtocolloApi = "http://MY_MACHINE_NAME.westeurope.cloudapp.azure.com:8081/PI_WebAPI";
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList")]
public IHttpActionResult GetAooList()
string jsonRequest = urlBaseProtocolloApi + "/API_TO_BE_CALLED";
CredentialCache credCache = new CredentialCache();
credCache.Add(new Uri(jsonRequest), "NTLM", CredentialCache.DefaultNetworkCredentials);
HttpWebRequest spRequest = (HttpWebRequest)HttpWebRequest.Create(jsonRequest);
spRequest.Credentials = credCache;
spRequest.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
spRequest.Method = "GET";
spRequest.Accept = "application/json;odata=verbose";
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
...............................................................................
...............................................................................
...............................................................................
As you can see I am trying to retrieve the DefaultNetworkCredentials of my web app (that I expected to be the logged user credential that I should use to perform the call to my second REST API). But it is not working, infact doing in this way when this line is performed:
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
I obtain the following exception:
System.Net.WebException: 'The remote server returned an error: (401) Unauthorized.'
But I think that maybe it could be something near to "the good way" (using the NTLM protocol) because if instead to use the DefaultNetworkCredentials I manually set my credential in the code it works fine and I correctly obtain the REST API response.
I have done it in this way:
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList")]
public IHttpActionResult GetAooList()
Console.WriteLine("INTO GetAooList()");
string jsonRequest = urlBaseProtocolloApi + "/API_TO_BE_CALLED";
NetworkCredential myCreds = new NetworkCredential("MY_USERNAME", "MY_PSWD", "THE_DOMAIN");
CredentialCache credCache = new CredentialCache();
credCache.Add(new Uri(jsonRequest), "NTLM", myCreds);
//credCache.Add(new Uri(jsonRequest), "NTLM", CredentialCache.DefaultNetworkCredentials);
HttpWebRequest spRequest = (HttpWebRequest)HttpWebRequest.Create(jsonRequest);
spRequest.Credentials = credCache;
spRequest.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
spRequest.Method = "GET";
spRequest.Accept = "application/json;odata=verbose";
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
..........................................................................................
..........................................................................................
..........................................................................................
As you can see using this line:
NetworkCredential myCreds = new NetworkCredential("MY_USERNAME", "MY_PSWD", "THE_DOMAIN");
in which I am setting username, password and the DOMAIN (the web app and the API should run on different environments but on the same domain) it works fine and the API is correctly called.
Obviously I can not mock these information into my controller method code. I need a way to retrieve these credential info and use it.
Some idea? How can I do it? What am I missing?
c# .net azure httpwebrequest ntlm
I think you may want to use "connection strings" azure.microsoft.com/en-us/blog/…
– Rthomas529
Nov 16 '18 at 22:17
add a comment |
I am not so into .NET and I am finding the following difficulies.
I have a use case similar to this one: How to get HttpClient to pass credentials along with the request?
Basically I have a .NET web application (on which users can log in) running in the Azure cloud (it is an application running into SharePoint, I don't know if it could be a relevant details).
Into the back end of this webapp I implemented an ApiController controller that have to call another second REST API.
This second API is running on another environment (it should be a machine on Azure) but both these environments should "share" credential in some way. I think that it is very important point, I try to explain the situation in practice:
I have my .NET web application running on an environment A. The user can log into this application inserting his credential.
On another environment B is running the API that the previous web application have to call. The endpoint is sometning like: *http://MY_MACHINE_NAME.westeurope.cloudapp.azure.com:8081/PI_WebAPI/API_TO_BE_CALLED (as you can see it runs on a azure VM).
The web app and the API run on two different environments in the but they share credentials (I don't know the details but it works in this way, I think that they should be on a same domain). The proof of this assertion is that if I call my API (from the browser) it ask me my user credential (in a borwser popup). But if I first log into my web application (running on the environment A) and then I call my API (running on the environment B) on another browser tab it directly access because it know that I am logged in the system.
What I have to do is allow the back end of my web application (running on the environment A) to call this API (running on the environment B) using the credentials of the logged user.
So I was trying to implement the previous post strategy.
I implemented my controller in this way:
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList2")]
public IHttpActionResult GetAooList2()
Console.WriteLine("INTO GetAooList2()");
string jsonRequest = urlBaseProtocolloApi + "/api/ProtocollaMail/GetListAOO";
var wi = (System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity;
var wic = wi.Impersonate();
..............................................................
..............................................................
..............................................................
return Ok("TEST");
My idea is to obtain the logged user credential and impersonate these credential before perform my call.
The problem is that when the Impersonate() method is performed I obtain the following exception:
System.InvalidOperationException: 'An anonymous identity cannot perform an impersonation.'
So I think that it can't retrieve the identity. Looking into the wi object (the one on which I call the impersonate() method) I found the IsAnonymous property setted to true and it seems to me that it is not containing info on the logged user.
As explained I am not into .NET and probably I am missing something, what?
Using this code what user am I tryng to impersonate?
I also tried to do it using this other implementation:
public class MailProtocolloController : ApiController
private String urlBaseProtocolloApi = "http://MY_MACHINE_NAME.westeurope.cloudapp.azure.com:8081/PI_WebAPI";
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList")]
public IHttpActionResult GetAooList()
string jsonRequest = urlBaseProtocolloApi + "/API_TO_BE_CALLED";
CredentialCache credCache = new CredentialCache();
credCache.Add(new Uri(jsonRequest), "NTLM", CredentialCache.DefaultNetworkCredentials);
HttpWebRequest spRequest = (HttpWebRequest)HttpWebRequest.Create(jsonRequest);
spRequest.Credentials = credCache;
spRequest.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
spRequest.Method = "GET";
spRequest.Accept = "application/json;odata=verbose";
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
...............................................................................
...............................................................................
...............................................................................
As you can see I am trying to retrieve the DefaultNetworkCredentials of my web app (that I expected to be the logged user credential that I should use to perform the call to my second REST API). But it is not working, infact doing in this way when this line is performed:
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
I obtain the following exception:
System.Net.WebException: 'The remote server returned an error: (401) Unauthorized.'
But I think that maybe it could be something near to "the good way" (using the NTLM protocol) because if instead to use the DefaultNetworkCredentials I manually set my credential in the code it works fine and I correctly obtain the REST API response.
I have done it in this way:
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList")]
public IHttpActionResult GetAooList()
Console.WriteLine("INTO GetAooList()");
string jsonRequest = urlBaseProtocolloApi + "/API_TO_BE_CALLED";
NetworkCredential myCreds = new NetworkCredential("MY_USERNAME", "MY_PSWD", "THE_DOMAIN");
CredentialCache credCache = new CredentialCache();
credCache.Add(new Uri(jsonRequest), "NTLM", myCreds);
//credCache.Add(new Uri(jsonRequest), "NTLM", CredentialCache.DefaultNetworkCredentials);
HttpWebRequest spRequest = (HttpWebRequest)HttpWebRequest.Create(jsonRequest);
spRequest.Credentials = credCache;
spRequest.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
spRequest.Method = "GET";
spRequest.Accept = "application/json;odata=verbose";
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
..........................................................................................
..........................................................................................
..........................................................................................
As you can see using this line:
NetworkCredential myCreds = new NetworkCredential("MY_USERNAME", "MY_PSWD", "THE_DOMAIN");
in which I am setting username, password and the DOMAIN (the web app and the API should run on different environments but on the same domain) it works fine and the API is correctly called.
Obviously I can not mock these information into my controller method code. I need a way to retrieve these credential info and use it.
Some idea? How can I do it? What am I missing?
c# .net azure httpwebrequest ntlm
I am not so into .NET and I am finding the following difficulies.
I have a use case similar to this one: How to get HttpClient to pass credentials along with the request?
Basically I have a .NET web application (on which users can log in) running in the Azure cloud (it is an application running into SharePoint, I don't know if it could be a relevant details).
Into the back end of this webapp I implemented an ApiController controller that have to call another second REST API.
This second API is running on another environment (it should be a machine on Azure) but both these environments should "share" credential in some way. I think that it is very important point, I try to explain the situation in practice:
I have my .NET web application running on an environment A. The user can log into this application inserting his credential.
On another environment B is running the API that the previous web application have to call. The endpoint is sometning like: *http://MY_MACHINE_NAME.westeurope.cloudapp.azure.com:8081/PI_WebAPI/API_TO_BE_CALLED (as you can see it runs on a azure VM).
The web app and the API run on two different environments in the but they share credentials (I don't know the details but it works in this way, I think that they should be on a same domain). The proof of this assertion is that if I call my API (from the browser) it ask me my user credential (in a borwser popup). But if I first log into my web application (running on the environment A) and then I call my API (running on the environment B) on another browser tab it directly access because it know that I am logged in the system.
What I have to do is allow the back end of my web application (running on the environment A) to call this API (running on the environment B) using the credentials of the logged user.
So I was trying to implement the previous post strategy.
I implemented my controller in this way:
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList2")]
public IHttpActionResult GetAooList2()
Console.WriteLine("INTO GetAooList2()");
string jsonRequest = urlBaseProtocolloApi + "/api/ProtocollaMail/GetListAOO";
var wi = (System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity;
var wic = wi.Impersonate();
..............................................................
..............................................................
..............................................................
return Ok("TEST");
My idea is to obtain the logged user credential and impersonate these credential before perform my call.
The problem is that when the Impersonate() method is performed I obtain the following exception:
System.InvalidOperationException: 'An anonymous identity cannot perform an impersonation.'
So I think that it can't retrieve the identity. Looking into the wi object (the one on which I call the impersonate() method) I found the IsAnonymous property setted to true and it seems to me that it is not containing info on the logged user.
As explained I am not into .NET and probably I am missing something, what?
Using this code what user am I tryng to impersonate?
I also tried to do it using this other implementation:
public class MailProtocolloController : ApiController
private String urlBaseProtocolloApi = "http://MY_MACHINE_NAME.westeurope.cloudapp.azure.com:8081/PI_WebAPI";
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList")]
public IHttpActionResult GetAooList()
string jsonRequest = urlBaseProtocolloApi + "/API_TO_BE_CALLED";
CredentialCache credCache = new CredentialCache();
credCache.Add(new Uri(jsonRequest), "NTLM", CredentialCache.DefaultNetworkCredentials);
HttpWebRequest spRequest = (HttpWebRequest)HttpWebRequest.Create(jsonRequest);
spRequest.Credentials = credCache;
spRequest.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
spRequest.Method = "GET";
spRequest.Accept = "application/json;odata=verbose";
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
...............................................................................
...............................................................................
...............................................................................
As you can see I am trying to retrieve the DefaultNetworkCredentials of my web app (that I expected to be the logged user credential that I should use to perform the call to my second REST API). But it is not working, infact doing in this way when this line is performed:
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
I obtain the following exception:
System.Net.WebException: 'The remote server returned an error: (401) Unauthorized.'
But I think that maybe it could be something near to "the good way" (using the NTLM protocol) because if instead to use the DefaultNetworkCredentials I manually set my credential in the code it works fine and I correctly obtain the REST API response.
I have done it in this way:
[SharePointContextWebAPIFilter]
[HttpGet]
[ActionName("GetAooList")]
public IHttpActionResult GetAooList()
Console.WriteLine("INTO GetAooList()");
string jsonRequest = urlBaseProtocolloApi + "/API_TO_BE_CALLED";
NetworkCredential myCreds = new NetworkCredential("MY_USERNAME", "MY_PSWD", "THE_DOMAIN");
CredentialCache credCache = new CredentialCache();
credCache.Add(new Uri(jsonRequest), "NTLM", myCreds);
//credCache.Add(new Uri(jsonRequest), "NTLM", CredentialCache.DefaultNetworkCredentials);
HttpWebRequest spRequest = (HttpWebRequest)HttpWebRequest.Create(jsonRequest);
spRequest.Credentials = credCache;
spRequest.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
spRequest.Method = "GET";
spRequest.Accept = "application/json;odata=verbose";
HttpWebResponse endpointResponse = (HttpWebResponse)spRequest.GetResponse();
..........................................................................................
..........................................................................................
..........................................................................................
As you can see using this line:
NetworkCredential myCreds = new NetworkCredential("MY_USERNAME", "MY_PSWD", "THE_DOMAIN");
in which I am setting username, password and the DOMAIN (the web app and the API should run on different environments but on the same domain) it works fine and the API is correctly called.
Obviously I can not mock these information into my controller method code. I need a way to retrieve these credential info and use it.
Some idea? How can I do it? What am I missing?
c# .net azure httpwebrequest ntlm
c# .net azure httpwebrequest ntlm
asked Nov 16 '18 at 12:37
AndreaNobiliAndreaNobili
13.5k59182343
13.5k59182343
I think you may want to use "connection strings" azure.microsoft.com/en-us/blog/…
– Rthomas529
Nov 16 '18 at 22:17
add a comment |
I think you may want to use "connection strings" azure.microsoft.com/en-us/blog/…
– Rthomas529
Nov 16 '18 at 22:17
I think you may want to use "connection strings" azure.microsoft.com/en-us/blog/…
– Rthomas529
Nov 16 '18 at 22:17
I think you may want to use "connection strings" azure.microsoft.com/en-us/blog/…
– Rthomas529
Nov 16 '18 at 22:17
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53338074%2fhow-to-call-this-api-from-the-back-end-of-this-web-app-sharing-credential-they%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53338074%2fhow-to-call-this-api-from-the-back-end-of-this-web-app-sharing-credential-they%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think you may want to use "connection strings" azure.microsoft.com/en-us/blog/…
– Rthomas529
Nov 16 '18 at 22:17