How to get user language settings in Teams? - microsoft-graph-api

Is it possible to retrieve the language setting of a user inside Teams using the Microsoft Graph REST API v1.0?

There is no such specific API for teams language ,you can use PATCH method to update a subset of the properties of a user's regional and language settings https://graph.microsoft.com/beta/me/settings/regionalandlanguagesettings
Content-type: application/json
Please see the docs for more info - https://learn.microsoft.com/en-us/graph/api/regionalandlanguagesettings-update?view=graph-rest-beta&tabs=http
Hope this helps.

Related

Get all TI Indicators returns an empty list

I am trying to collect all active TIs via the Beta Graph API by following this. But it doesn't return anything. Here is what I use in Postman:
https://graph.microsoft.com/beta/security/tiIndicators
Response (200):
{
"#odata.context": "https://graph.microsoft.com/beta/$metadata#security/tiIndicators",
"value": []
}
A bit of context for the environment I work in.
The tenant has multiple Sentinel workspaces & resource groups.
The application I use has the correct permissions:
ThreatIndicators.Read.All
ThreatIndicators.ReadWrite.OwnedBy
ThreatSubmission.Read.All
ThreatSubmission.ReadWrite.All
It is my current belief that this might be due to the limitations of the Beta API. My reasoning is that accourding to this documentation you need the ThreatIndicators.ReadWrite.OwnedBy permission to access the API. This would suggest that currently you can only view TI's that the resource itself created.
If more info is needed just ask.
According to the documentation, ThreatIndicators.ReadWrite.OwnedBy permission allow you to manage threat indicators your app creates or owns.
If you want to read all the threat indicators for your organization then your app needs ThreatIndicators.Read.All permission.
Although this is not a solution to the question it is a workaround. By using the Log Analytics API you can get the TI via a KQL.
ThreatIntelligenceIndicator
| where ExpirationDateTime > now() and
NetworkIP matches regex #"^(?:(?:25[0-5]|(?:2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$" and
ConfidenceScore > 25
| summarize by NetworkIP
This is probably better as you can also use a watchlist to exclude specific IP addresses with one request.
One thing I struggled with this was Authorization. You must give your Application permission to use the api.loganalytics.io API, and the application needs the Log Analytics Reader role in the Log Analytic workspace you want to use.

Test/Sandbox Environment for Google My Business API

I just started with using Google My Business API and was able to perform the get operations just to verify that my Oauth setup is right. Now I want to add a location using the post method for GMB Add location API but before I push my code to production I want to test out this request. Do we have any testing/sandbox environment for Google My Business API testing ?
For anyone coming here for reference I guess if you are using third party tools(Integromat/ Zapier) to make the API Call, the best way is to validate your request by passing in query parameter: validateOnly = True
According to their doc, this is not possible. please read more here

patch request to microsoft graph api for planner task does not return the updated task in the response

According to the documentation on updating order hints in planner.
The client can obtain the values immediate if return=representation preference is specified in the PATCH requests.
I've tried putting this in the header, and as a query parameter, but I still only get back a 204 response.
Where in the PATCH request, does the return=representation go ?
Just as you can see in the docs:
Important: APIs under the /beta version in Microsoft Graph are in
preview and are subject to change. Use of these APIs in production
applications is not supported.
The API is still in development. So the documentation may update too.
You can submit an issue to the Github issue list first. Meanwhile vote up the existing request or submit a new one in the UserVoice
The graph sdk team enlightened me.
The header Prefer:return=representation is what needs to be set.

Endpoint nodes list in Kaa

I want to get list of endpoints in Kaa, I see many REST functions here but all of them need informations like Endpoint Hash Key and ... but I don't know how I can find them. Anybody can help me how I can do this ? and is there a way for geting event on device discovery in Kaa ?
Thanks in advance
On your link for each Rest call, there is the description with the endpoint cresponding to the request. For example:
Get user authentication status
URL : /kaaAdmin/rest/api/auth/checkAuth
Same for parameter needed.
If that's not what you are looking for, you might have to explain a little bit more.
You are able to get endpoint key hash in 3 ways :
Get information from Client SDK on your device. Check appropriate documentation of you desirable SDK.
Look at Admin UI in Endpoint profiles menu.
Get via Admin REST API .
Please, check profiling section.
I think it will help you to find your desired information.

TFS WebAccess API - attaching file and details

I want to use the TFS WebAccess to open/manage work items.
I have found some documentation here on how to open work items using an URL:
http://msdn.microsoft.com/en-us/library/bb822136%28VS.90%29.aspx
http:// Server : Port /wi.aspx?pname= Project &wit= Type &[ Field1 ]= Value1 &[ Field2 ]= Value2
Is there some documented way to use POST to attach items and provide other details in one HTTP call?
There is no REST api (or other way) on web access to post changes to work items. It is a great idea though. Please use user voice to file your suggestion. This place is actively monitored by the TFS product group for future features.
After some digging-up, it seems that the only way to currently do it is to either use the SOAP webservices, which are rather limited - TFS 2010 WebServices
Or you can go with trying to reverse engineer the HTTP protocol by mimicking the requests sent from a TFS client, for the methods that are not exposed above.

Resources