Comments (2)
@pdx-mikaelberg
Thank you for this feedback! I am working on some updates right now so I will work on doing this. Sorry for the long delayed response as I was occupied with other engagements and just now circling back to make some of the feedback updates.
from microsoft-store-services.
Here is what I added / updated. I thought about encoding the whole body to be safe, but decided to just go with the client secret as the other values should not have the characters that would cause issues. Then it makes the calls easier to read in Fiddler or other debugging tools.
// URL encode the Secret key to ensure it gets properly transmitted if containing
// characters such as '%'. We just encode the secret so the rest of the body is
// easily read in debugging tools such as Fiddler.
var encodedSecret = System.Web.HttpUtility.UrlEncode(_clientSecret);
// Build the HTTP request information to generate the access token
var requestUri = $"https://login.microsoftonline.com/{_tenantId}/oauth2/token";
var httpRequest = new HttpRequestMessage(HttpMethod.Post, requestUri.ToString());
var requestBody = $"grant_type=client_credentials&client_id={_clientId}" +
$"&client_secret={encodedSecret}" +
$"&resource={audience}";
httpRequest.Content = new StringContent(requestBody, Encoding.UTF8, "application/x-www-form-urlencoded");
from microsoft-store-services.
Related Issues (8)
- Can't download Store, no Store available on OS HOT 1
- Tracking Id should be a GUID
- Consider retrieving the response body despite non-Success Status Code HOT 1
- AAD Access Tokens returned in v1.0 when v2.0 is requested. Can't use Certificate to request a token HOT 3
- A few questions HOT 16
- Provide a publisher-specific Microsoft Store user ID HOT 3
- Provide License Acquired Date HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft-store-services.