Securing WebAPI with Azure AD and Accessing it on Windows Phone - windows-phone-8

I’m trying (since 3 days, and more than 10 attempts) to get my Windows Phone (Xamarin iOS and Android afterwards) authenticated against Azure AD but somehow it is not working for me. I’m following article as mentioned here: http://www.cloudidentity.com/blog/2013/04/29/fun-with-windows-azure-ad-calling-rest-services-from-a-windows-phone-8-app/
I did following steps:
Created ASP.NET MVC5 web site with Org Account (app registers in my AD as AppA)
I added a Web API which returns Hello World string
I build the project and test if is working. I do get Hello World
Then I create Azure Web Site & download publishing profile
Publish existing ASP.NET MVC site with org account. VS asks for credentials and create another app in Azure AD (AppB)
The site and Web API works fine
I create Native app (AppC) in Azure AD and give access to Web API (from AppB)
I create Windows Phone application and provide return URL and client ID from (AppC)
I add resource URI for this native app from AppB
I type in code as it is from above URL.
Now, if I run the project, I do get below details:
"access_token": "eyJ0eXAvv9w",
"token_type": "Bearer",
"expires_in": "3599",
"expires_on": "1391805190",
"resource": "https://mayurt.onmicrosoft.com/WebApp-dailystatusupdater.azurewebsites.net",
"refresh_token": "AwAB...IgAA",
"scope": "user_impersonation",
"id_token": "eyJ0eXAIn0."
Now if I call the Web API, I’m redirected to login page but I can’t see any error. I tried Postman as well as Fiddler.

Thanks Philippe Signoret.
And Thanks to Vittorio for his series of posts which helped me to solve this issue. You can find more information here: cloudidentity blog

Related

The app which has published in Google store can not be lanchered by the voice of Google Assistant

The related app I have published in Google Store ,I kown App Action testing must be completed on a physical Android device. but when Attempting to invoke App Actions on a virtual device using Assistant can result in the response "Sorry, I couldn't find that" instead of the expected deep link.I would like to know what I should do to fix this issue ,thanks very much!The develope account is :empg.ev

Google Fit on Android is working on debug but not on production

I am using History API to get user steps. It's working on debug but not on production.
I had created two certificates on OAuth 2.0 Client for both debug and production apps.
Unfortunately, I can get the steps in debug app, but not in the production signed app.
The app is not published for public yet. It's still in the internal testing. It's of course signed with production key.
When running the app, it shows Google authentication dialog so users can select Google account to be used for authentication. Upon selecting account, it shows error:
com.google.android.gms.common.api.ApiException: 4: The user must be signed in to make this API call.
Any help please?
Hopefully ✓this answer saved my time.
Basically, when your app using "App Signing", you need to check the SHA1 used by "App Signing", not the one mentioned on the official Google Fit documentation as release certificate.

Splitting web-app and mobile-app request in Yii2

I created a restful web-app platform using yii2 framework. It is working with no problems using a browser. Now I'm developing a mobile-app with angular and ionic and I'm searching for some guide to help me splitting the request from browser and app. Using the browser the web-app is configured to have a html view response, how can I detect a mobile-app request to change response in JSON format in each controller/action?
It's my first mobile-app development.
I just fighted this same war this week and I ended up splitting the folders and generating a new yii-app with fresh controllers just for the api.
I tried creating the api folder inside the web backend project, but I had to much problems with redirections, and as I was working from Android emulator fueled by Expo it was almost impossible to reach the api inside my localhost from outside.
At the end in the API REST you just reuse the database connection, rest of files are new. So there is no much to win in placing it in the same folder/project.
By the way, read this documentation: Implementing RESTful Web Service APIs in Yii2
As a code example you could check my yii2 web app: https://github.com/jvidalv/fempoble
And the api that works with the web: https://github.com/jvidalv/api-fempoble

Is it possible to send push notification to a Chrome Web user using Azure Notification Hub?

I would like to send notifications to the mobile users of my website (especially Android/Chrome users).
I see that Azure Notification Hub handle Google (GCM) technology, and i've red this tutorial: Send push notifications to Chrome apps, but can this be done with a simple Web application, and not a Chrome Application like in this tutorial?
My application is an ASP.NET MVC 4.5, hosted on Azure.
This feature is currently not supported with Azure Notification Hubs. However, this is in the future roadmap for the product.

OneNote 2013 API Sample for Windows Forms app

Can I write a simple Hello World app for Windows Forms using the OneNote 2013 API? I can find no example of this.
There isn't a published sample right now, as we don't have a Live SDK for desktop windows for doing the necessary auth.
If you can use another library to get an OAUTH token for your Microsoft account, then you can just copy/paste the HTML and service calling code from the Windows Store application.