The Get All Resource Providers operation returns all the resource providers in the system as a list of resource provider objects

Request

The Get All Resource Providers request may be specified as follows.

Method Request URI HTTP Version

GET

https://admin-management.contoso.net/resourceproviders

HTTP/1.1

URI Parameters

None.

Request Headers

The following table describes request headers.

Request Header Description

Authorization

Specifies the credentials for this request. The value of this header must be set Negotiate <token>.

Request Body

None.

Response

The response includes an HTTP status code, a set of response headers, and a response body.

Status Code

The status code is embedded in the response for this operation; if successful, it will be status code 200 (OK).

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response Header Description

Content-Length

This lists the number of resource providers in the system

Response Body

The format of the response body is as follows:

  Copy Code
[
{ "Name": "T2VPPBGD", "DisplayName": "DisplayName:T2VPPBGD", "Enabled": true, "PassThroughEnabled": true, "AllowAnonymousAccess": false, "AdminEndpoint": { "ForwardingAddress": "http://energy:8005/dummy/T2VPPBGD/AdminEndpoint", "AuthenticationMode": 0 }, "TenantEndpoint": { "ForwardingAddress": "http://energy:8005/dummy/T2VPPBGD/TenantEndpoint", "AuthenticationMode": 0 }, "NotificationEndpoint": { "ForwardingAddress": "http://energy:8005/dummy/T2VPPBGD/NotificationEndpoint", "AuthenticationMode": 0 } },
{ "Name": "UX2WRCSQ", "DisplayName": "DisplayName:UX2WRCSQ", "Enabled": true, "PassThroughEnabled": true, "AllowAnonymousAccess": false, "AdminEndpoint": { "ForwardingAddress": "http://energy:8005/dummy/UX2WRCSQ/AdminEndpoint", "AuthenticationMode": 0 }, "TenantEndpoint": { "ForwardingAddress": "http://energy:8005/dummy/UX2WRCSQ/TenantEndpoint", "AuthenticationMode": 0 }, "NotificationEndpoint": { "ForwardingAddress": "http://energy:8005/dummy/UX2WRCSQ/NotificationEndpoint", "AuthenticationMode": 0 } }
]

The following table describes the key elements of the response body:

Element Name

Description

Name

A name for the resource provider that is unique

DisplayName

The name can be used identify the resource provider for your tracking purposes.

Enabled

Specifies whether the resource provider is created in enabled state.

PassThroughEnabled

Specifies whether the resource provider is created in passthrough-enabled state.

AllowAnonymousAccess

Specifies anonymous access mode for the resource provider

AdminEndpoint

Specifies the forwarding address for the administrator endpoint

TenantEndpoint

Specifies the forwarding address for the tenant endpoint

NotificationEndpoint

Specifies the forwarding address for the notification endpoint

Example

Get all resource providers.

  Copy Code
public ResourceProviderList GetAllResourceProviders(string adminServiceEndpoint)
{
	HttpClient httpClient = new HttpClient();
	httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("BASIC", Convert.ToBase64String(UnicodeEncoding.Unicode.GetBytes("AdminPortal:" + ”password”)))));

	string subscriptionEndpoint = adminServiceEndpoint + "resourceproviders/";
	var response = httpClient.GetAsync(subscriptionEndpoint);
	var resultsStr = response.Result.Content.ReadAsStringAsync().Result;
	var result = JsonConvert.DeserializeObject<ResourceProviderList>(resultsStr);
	//Console.WriteLine(resultsStr);
	return result;
}