private AcquireAccessTokenResult InternalAcquireAccessToken(string AuthorizationCode)
        {
            // Build a POST body.
            string postBody = "grant_type=authorization_code" +
                              "&Resource=" + System.Web.HttpUtility.UrlEncode(Util.ConvertResourceEnumToUri(Resource)) +
                              "&client_id=" + ClientID +
                              "&code=" + AuthorizationCode +
                              "&redirect_uri=" + System.Web.HttpUtility.UrlEncode(RedirectUri);

            string endPoint = "https://login.microsoftonline.com/" + TenantName.Replace("@", ".") + "/oauth2/token";

            return(AcquireAccessToken(postBody, endPoint));
        }