summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGirish Bablani <girishb@microsoft.com>2013-05-19 03:00:25 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2013-05-26 06:56:47 -0700
commite76acf322a3fc6d4bb52e88d1a2ae804234916e3 (patch)
treead138d8400b64c3ed84051712f720167cf302360 /src
parent789f14adf18e65ab416b60341bfbecc6577a1c37 (diff)
downloadDotNetOpenAuth-e76acf322a3fc6d4bb52e88d1a2ae804234916e3.zip
DotNetOpenAuth-e76acf322a3fc6d4bb52e88d1a2ae804234916e3.tar.gz
DotNetOpenAuth-e76acf322a3fc6d4bb52e88d1a2ae804234916e3.tar.bz2
Changed "global" endpoint to "common" endpoint to fix breaking change. Updated appid for sample app.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.AspNet/Clients/OAuth2/AzureADClient.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/AzureADClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/AzureADClient.cs
index 578975c..f596ba0 100644
--- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/AzureADClient.cs
+++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/AzureADClient.cs
@@ -30,17 +30,17 @@ namespace DotNetOpenAuth.AspNet.Clients {
/// <summary>
/// The authorization endpoint.
/// </summary>
- private const string AuthorizationEndpoint = "https://login.windows.net/global/oauth2/authorize";
+ private const string AuthorizationEndpoint = "https://login.windows.net/common/oauth2/authorize";
/// <summary>
/// The token endpoint.
/// </summary>
- private const string TokenEndpoint = "https://login.windows.net/global/oauth2/token";
+ private const string TokenEndpoint = "https://login.windows.net/common/oauth2/token";
/// <summary>
/// The name of the graph resource.
/// </summary>
- private const string GraphResource = "00000002-0000-0000-c000-000000000000/graph.windows.net";
+ private const string GraphResource = "https://graph.windows.net";
/// <summary>
/// The URL to get the token decoding certificate from.
@@ -151,7 +151,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
{ "response_type", "code" },
{ "resource", this.resource },
});
- return builder.Uri;
+ return builder.Uri;
}
/// <summary>
@@ -169,7 +169,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
AzureADGraph graphData;
WebRequest request =
WebRequest.Create(
- GraphEndpoint + this.tenantid + "/users/" + this.userid + "?api-version=0.9");
+ GraphEndpoint + this.tenantid + "/users/" + this.userid + "?api-version=2013-04-05");
request.Headers = new WebHeaderCollection();
request.Headers.Add("authorization", accessToken);
using (var response = request.GetResponse())
@@ -218,6 +218,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
{ "client_secret", this.appSecret },
{ "code", authorizationCode },
{ "grant_type", "authorization_code" },
+ {"api_version","1.0"},
});
WebRequest tokenRequest = WebRequest.Create(TokenEndpoint);