UCWA: makeMeAvailable returning forbidden and API confusion - skype-for-business

I'm trying to create a small console application sending and receiving message from SFB.
I started by using the code from https://github.com/tamhinsf/ucwa-sfbo-console and followed the readme.md for creating the app in the Azure Management Portal (I assigned all the delegated permissions just to be sure).
All already included API work (so I'm sure I'm logging in correctly), but when I try to invoke makeMeAvailable to receive IM call (looking at https://ucwa.skype.com/documentation/KeyTasks-Communication-IncomingIMCall) I get the following response
{"code":"Forbidden","message":"The requested operation isn\u0027t allowed."}
My post data is the following
{"SupportedModalities":["Messaging"]}
Which is just as the example from the ucwa.skype.com site.
I'm also finding problematic to send a message, on the skype site the https://ucwa.skype.com/documentation/Resources-startMessaging shows a call to
Post https://fe1.contoso.com:443//v1/applications/970/communication/startMessaging
but on my application response embedded.communication._links.startMessaging is /messagingInvitations and not /startMessaging.
The documentation on https://ucwa.skype.com/documentation/KeyTasks-CreateApplication-3 also shows
"startMessaging":{"href":"/ucwa/oauth/v1/applications/105/communication/messagingInvitations"},
I'm quite confused over what I should do to correctly send and receive messages and the API documentation did not really help.
Thank you in advance.

makeMeAvailable isn't supported yet in UCWA for Online. Probably when it'll be introduced, a new app permission will be added in AAD permissions, which will need to be granted. So, that's expected, but the documentation is indeed outdated and just referring to behavior for UCWA for On-Prem.
See also / vote: Enable 'me' resource and controlling self user's presence in UCWA
You're correct, good finding. However, POSTing on the messagingInvitations resource (which is no where in documentation), is the correct way. So following the principle of using the URIs returned by operations, and not composing URIs by convention in your code is the way to go.
You can notify this by creating an issue here: https://github.com/OfficeDev/skype-docs/issues

Related

Call Azure function from Dynamics 365 using oauth2

I've been searching about call an Azure function from CRM using ouath2, all the information that I found is about using function key to call the Azure functions from Dynamics 365.
Please if someone knows, please let me know if ouath2.0 is possible and how I can implement it?
I opened up a github issue to get update from Microsoft on this topic (as I know this is a challenge for a long time), it is still not positive, but may get some feature in near future. Until then we may have to use HttpClient in plugin directly instead of webhook.
This is a known challenge which Web Hooks doesn't even attempt to
address. Your options are limited. So this is a feature request rather
than a documentation issue.
If you attempt to call such an authenticated service using an
HttpClient in a plug-in, you have more options. But none of them today
represent best practices that we would recommend specifically at this
time, although I see people making them work in community posts.
Setting a certificate or secret value within the secure configuration
of the plug-in seems to be the best solution I've seen. But we are
looking to provide something better.

For Dropbox API is there a way to pull a list of users and see if MFA is enabled?

I am wanting to pull all users in my company dropbox and then check to see if their accounts have MFA enabled. I read over the documentation for Dropbox api but did not see anything stand out where this was possible.
It's very sad to realize that a popular platform such as Dropbox doesn't expose A LOT of basic features through its API (and the SDK itself is far from being OK, compared to G-Suite). Anyway, there are two hacky methods you can use in order to pull out that information (with some limitations).
First method:
By analyzing the team events using team_members_list() you can filter out tfa_change_status_details events. When new_value=TfaConfiguration('[sms|other]', None) is specified - 2FA is enabled.
The information I found out that can be retrieved using this method is:
has_2fa - whether 2FA was ever configured.
is_tfa_enabled - whether 2FA is currently enabled.
tfa_type - whether 2FA is by SMS or by app.
However, keep in mind that you have to track changes constantly and also keep in mind that Dropbox saves team events for only two years.
Second method:
Using the front-end dashboard API this information can be retrieved (I can't remember the API name, I think that it is /2/get_multifactor and inside you'd find some information about its status and the organizational policy regarding 2FA). However, to use the front-end dashboard API (which is totally undocumented) you'd need to simulate a successful login (and correctly use the lid and jar cookies) and you'd also need to bypass the random captcha that appears when you abuse the service with too many requests.
To be honest, Dropbox's API is weak, neglected, and ugly. I wish I never had to use it. Anyway, I would recommend using the first method and pray for a significant update to the API
No, unfortunately the Dropbox API doesn't expose this. We'll consider it a feature request.
There's a feature request open for this one (https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/MFA-status-for-users/m-p/468564#M23886). But I wouldn't hold your breath, as #Aviv mentioned the Dropbox API seems surprisingly neglected at the moment.

Open Contrail API, post request on project resource

I'm working on a cloud project and I have to use Contrail it provides a RESTful API to use, but it is documentation is too small. I would like to know how to perform rest requests, especially post requests on "project" resource.
Each Contrail config node provides supported API details(searchable) at http://:8082/documentation/index.html
You could also check here which is a bit old but should serve your project API needs.
Your question is old, but as there are no other answers I thought I would contribute one. Were you interested in an answer or just wanted to share the documentation you'd written? I agree with you that Contrail documentation is very scarce, and every attempt to contribute to it should be appreciated. I had to integrate with Contrail API a while ago, and found out that in some cases I had to call OpenStack APIs to get the job done (Contrail is built on top of OpenStack). Project and user management were some of them.
I wrote a documentation about Contrail api, For each resource I mention the allowed methods and which parameters to integrate on the request body and I test it until I get it to work finally I put an example. I haven't finished the documentation, I stopped working on Open Contrail. The documentation is my personal try maybe it would be useful and maybe it contains some mistakes, Thus, I would like to share it. You can find it here.

New Messaging System API for non developer accounts

According to this blog post the new messaging system should be accessible via the API (fql/graph) for non developer account as of end of November. It still gives OAuthException with message "You must be a developer of the application".
I was unable to find any updates on this issue from Facebook or other sources. Anyone knows what is going on with this and when will it be accessible?
There was a bug opened on the subject, anyone who has interest in this might consider promoting it.
Going to answer my own question, according to the response on the bug seems like the official answer is:
"We said it would be published but it wasn't, so just wait until we say it will be published again".
Are you trying to read messages or send them? It's still not possible to send them but reading them should work for any app now

Trouble sending multiple notifications using APNS

I'm trying to send multiple notifications using my PHP script. But after sending about 50 or so out of the 10k users, I get a broken pipe warning. I'm not sure whether that message is sent.
From various other posts, I learnt that it could be because of a invalid token. However, my feedback service returns no invalid tokens. (ssl://feedback.push.apple.com:2196) Tried this both in production mode and sandbox mode.
What other reasons could cause this invalid pipe issue?
My exact problem is explained here by someone else as well.
http://pastie.org/698787.txt
Apple's servers will drop the connection as soon as there is something wrong in the stream of your push messages.
Be careful with mixing device tokens between sandbox and production modes. There's an article here that describes the issue.
Also, have you tried using the enhanced notification format described in Apple's documentation? The response might tell you what's wrong.