With reference to https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0.
Expected or Desired Behavior
With reference to https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0. while making user/delta API call we should get preferredDataLocation for multi geo
Observed Behavior
Unable to get preferredDataLocation in users/delta API
URL used : https://graph.microsoft.com/v1.0/users/delta?$select=id,mail,userType,userPrincipalName,accountEnabled,displayName,assignedPlans,preferredDataLocation
Image: Error In Postman Request
Response headers corresponding to your request(s):
Date - Wed, 03 Jul 2019 07:25:2
request-id - 1d42128-c88b-4e1c-9fd8-c6e0f7519a37 SPRequestGuid -
1d8dec9e-c071-0000-3f4a-597faa9ba2ef
Steps to Reproduce
Make graph API call with graph token
URL used : https://graph.microsoft.com/v1.0/users/delta?$select=id,mail,userType,userPrincipalName,accountEnabled,displayName,assignedPlans,preferredDataLocation
preferredDataLocation is not supported for https://graph.microsoft.com/v1.0/users/delta
You could use Microsoft Graph API Beta Version Use the below API URL
https://graph.microsoft.com/beta/users?$select=id,mail,userType,userPrincipalName,preferredDataLocation
See the screen shot :
Point To Remember:
If your DataLocation is not configured you have to configure it
other then preferredDataLocation will be shown as Null
You can have a look here how could you configure DataLocation
Related
This is about Azure Video Indexer API. I am using a trial account. (Using Corporate account to log in to the Video Indexer portal but using a trial, not a paid account yet). I uploaded a few videos using Indexer Portal. Then I am trying to use the Video Indexer API to get video index. The Get Video Index (or Get Project Index) APIs give proper response when called through the "Try it" panel of the Developer Portal. But when exactly same Get API is called through Java code, the response is blank. The response status is 200 OK. Response header also shows valid header as follows:
[Content-Length:"13052", Content-Type:"application/json; charset=utf-8", x-ms-request-id:"a747d33c-a1e8-444d-89ce-d49a531507c2", X-Content-Type-Options:"nosniff", Strict-Transport-Security:"max-age=31536000; includeSubDomains", api-supported-versions:"2.0", Access-Control-Allow-Credentials:"true", Date:"Thu, 27 Oct 2022 15:19:53 GMT"]
But response body just doesnt print anything.
(Just to repeat, the same Get API call works fine from the "Try it" panel using same/similar access token etc. But when called through Java code, it doesnt give back any response, not any error).
Any help would be highly appreciated.
I have already tried using the readily available Java code snippet provided in the "Try it" panel. But same behaviour.
Thanks.
mrisbud
I am trying setup media service pipeline via rest services using
https://learn.microsoft.com/en-us/azure/media-services/latest/stream-files-tutorial-with-rest
Section : Encode remote file stream video – REST
We are getting an error at mentioned Step : Create an output asset
As per documentation
https://management.azure.com/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.Media/mediaServices/:accountName/assets/:assetName?api-version={{api-version}}
Endpoint that we generaetd: https://management.azure.com/subscriptions/xxxx-xxx-xxx-xxx-xxxxxxxxxx/resourceGroups/xxxxxx_resource_group/providers/Microsoft.Media/mediaServices/xxxxx/assets/xxxxxxxxxx?api-version=2018-08-01
Even if we give api version as 2.1, 2.2 etc …. Then also error is same.
response error :
{
"error": {
"code": "MissingApiVersionParameter",
"message": "The api-version query parameter (?api-version=) is required for all requests."
}
}
In REST v2 the API versions were 2.0 through 2.19, current. But in the REST v3 the API the released version is 2018-07-01. See
https://learn.microsoft.com/en-us/rest/api/media/assets/createorupdate.
Also, download the Postman Collection for V3 and look at the URLs. Make sure that you are formatting them properly.
https://learn.microsoft.com/en-us/azure/media-services/latest/media-rest-apis-with-postman
Use the Postman Console to see the full URL post (open via Alt-CTL-C)
Typical create Asset call would look like:
https://management.azure.com/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.Media/mediaServices/:accountName/assets/:assetName?api-version={{api-version}}
"/assets?api-version=2018-07-01" is an example
My code calls the OneNote API to resolve a SharePoint Online site URL to a SiteCollectionId and SiteId. We get a bearer token, set the HTTP auth header and issue a GET request to:
https://www.onenote.com/api/v1.0/myorganization/sitecollections/FromUrl(url='https://mytenantxyz.sharepoint.com/sites/copynotesite')
For approx a week, it has been returning the expected response, similar to:
{
"#odata.context": "https://www.onenote.com:576/api/v1.0/$metadata#Microsoft.OneNote.Api.SiteMetadata",
"siteCollectionId": "111e03ac-468c-4a28-9aab-543098ef49bb",
"siteId": "555d72a0-f82f-4e4c-ae8a-17ef0ea04f32"
}
However, today it has decided to return the following in approx 9 out of 10 requests:
{
error": {
"code" : “20158”,
"message": "Unable to get SiteMetadta for the url specified in the request.",
"#api.url": "http://aka.ms/onenote-errors#C20158"
}
}
The Microsoft docs (link) explain error 20158 as:
"Unable to get metadata for the site URL specified in the request. Check the format of the supplied URL. Supported formats include https://domain.sharepoint.com/site-a and https://domain.com/sites/site-a. (SharePoint support is in Preview.)"
I was unaware that this was in preview any more (I thought it was GA), but anyway it doesn't explain why it intermittently works for exactly the same input (same URL and bearer token).
Could it just be a bug in the OneNote API or SharePoint API that it must call under the covers?
Please refer to the blog - http://blogs.msdn.com/b/onenotedev/archive/2015/06/11/and-sharepoint-makes-three.aspx
We added the FromUrl method so you can pass in an absolute site URL and get the site collection and site IDs. You should make this call only when needed, and then store the values (site collection and site IDs) for future use in your requests to the OneNote API.
this however does not answer intermittency. Please share the X-correlationId header with us for a failing request so that we can help further.
I am using nodejs and expressjs and using "paypal-ec" node package to do incontext paypal integration.
This is invoked with the following piece of code:
<script src='https://www.paypalobjects.com/js/external/dg.js' type='text/javascript'></script>
<script>
var dg = new PAYPAL.apps.DGFlow(
{
trigger: 'paypal_submit',
expType: 'instant'
});
</script>
What I have achieved with this
I am able to make payment in the Paypal Sandbox environment but it shows me older payment screen where in user needs to fill in the details of address etc (I am not able to attach screenshot because of credits)
What I want to achieve
I am trying to make payment with the screens where in user doesn't need to prefill any data also it gives better UI.
Some experience like provided in this plukr link http://plnkr.co/edit/3vfNSVRyq86pDR5mH4HH?p=preview
The problem with the given piece of code in plunk is that it doesn't expose what is there in the action method and how can I provide amount to it (or any other details if any).
Any kind of help is appreciated.
I get it but don't claim to be a node dev - yet :) so this is "conceptual":
At the end of the day, the server-side call (SetExpressCheckout) where you send your trnx details (items, price, return/cancel urls, etc.) to Paypal and obtain a token is unchanged (with the documented limitations and ignored params that is).
The change is in the front-end where:
the in-context js script<script async src="//www.paypalobjects.com/api/checkout.js"></script>
new redirect url : https://www.paypal.com/checkoutnow?token=[the token you obtained]
are in play
The linked sample's server-side SetExpressCheckout process is the:
http://166.78.8.98/cgi-bin/aries.cgi?sandbox=1&direct=1&returnurl=http://166.78.8.98/cgi-bin/return.htm&cancelurl=http://166.78.8.98/cgi-bin/cancel.htm
You can see the returnurl and cancelurl set (but it could have been done server side as well). This will obtain the token which is needed for the subsequent steps.
If you can inspect the traffic, you'll see the response where the redirect (that is "caught" in the front end and displayed "in-context"):
HTTP/1.1 302 Found
Date: Sun, 05 Jul 2015 16:00:48 GMT
Server: Apache/2.4.7 (Ubuntu)
Access-Control-Allow-Origin: *
Location: https://www.sandbox.paypal.com/checkoutnow?useraction=commit&token=EC-94X58918K2362702E&ul=0
This sample is probably more detailed and "less magical" (shows more of what's going on) and is what helped me implement:
http://plnkr.co/edit/UhNka4VaaRRGY1TK32LE?p=preview
Hth.
I am trying to make a simple REST call to the Set Blob Properties API (http://msdn.microsoft.com/en-us/library/windowsazure/hh452235) to just turn off/on logging. I have gotten the REST API call to successfully work for retrieving Blob Properties, so I know my hashing algorithms, headers-setting, and Authentication signature creation works, but I can't seem to get it working on the Set Properties side of things. I keep getting an error on the Authentication Header, so I know I'm not doing something right there.
I have copied below what is being created and eventually hashed and put into the auth header string. The online documentation (http://msdn.microsoft.com/en-us/library/windowsazure/dd179428) does not really help in determining which of these fields are absolutely required for this particular type of Blob request, so I've tried filling most of them in, but I don't seem to get a difference response regardless of what I fill in. I've also tried the Shared Key Lite authentication, which would be preferred since it's much more lightweight, but that doesn't seem to work either when I fill in all 5 of those fields.
Shared Key Authentication for Blob Services:
PUT\n
\n
\n
130\n
(MD5_CONTENT_HASH)
\n
\n
\n
\n
\n
\n
\n
x-ms-date:Tue, 19 Jun 2012 19:53:58 GMT\n
x-ms-version:2009-09-19\n
/(MY_ACCOUNT)/\n
comp:properties\n
restype:service
Is there anything obvious I'm missing here? The values (MD5_CONTENT_HASH) and (MY_ACCOUNT) are of course filled in when I make the request call, and the similar request call to "GET" the properties works fine when I send it. The only difference between that one and this is that I'm sending the MD5_content, along with the content-length. I may be missing something obvious here, though.
Any advice would be greatly appreciated! Thanks in advance.
-Vincent
EDIT MORE INFO:
Programming Language I'm using: Objective-C (iOS iPhone)
I'm also using ASIHTTPRequest to make the request. I simply define the request, setRequestMethod:#"PUT", then I create the request body and convert it to NSData to calculate the length. I attach the request-body data via the appendPostData method to the request. I then build the auth string above, hash the whole thing, and attach it to the request as a header called "Authorization".
Request Body String I'm using:
<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1</Version></Logging></StorageServiceProperties>
I know this is an incomplete request body, but I was planning on waiting for it to give a failure on "missing request body element" or something similar, until I proceeded on creating the full XML there. (could that be my issue?)
Error I get from the server:
<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:accc4fac-2701-409c-b1a7-b3a528ce7e8a
Time:2012-06-20T14:36:50.5313236Z</Message><AuthenticationErrorDetail>The MAC signature found in the HTTP request '(MY_HASH)' is not the same as any computed signature. Server used following string to sign: 'POST
130
x-ms-date:Wed, 20 Jun 2012 14:36:50 GMT
x-ms-version:2009-09-19
/(MY_ACCOUNT)/
comp:properties
restype:service'.</AuthenticationErrorDetail></Error>
What's odd is that the error I get back from the server seems to look like that, no matter how many parameters I pass into the Authentication signature.
Thanks for any help you can offer!
Comparing your signed string and the error message indicates that you're sending a POST request but signing as though you're sending a PUT.