Microsoft Graph API on existing MVC application - asp.net-mvc

I am implementing a webhook using a Microsoft Graph API using the tutorial on https://github.com/microsoftgraph/aspnet-webhooks-rest-sample.
I have made a demo version to work on my localhost. I have an existing web application host on Mircosoft Azure.
The issue or rather concern is that do I use the Account Controller provided by the link https://github.com/microsoftgraph/aspnet-webhooks-rest-sample. Or Merge it with my existing application

I have merged it but having trouble with the login process. The existing login is troubling with the login using office365. note that the office365 users are not part of the users table yet

Related

How to make cloud REST API call in Jira atlas connect app

I'm new to jira development.
I created an app in atlas connect cloud app. I want to use REST api calls in this app to access jira core features.
When user installed my app I want to get his projects and other details using rest calls.
How can I authenticate user and use rest api calls.
Thx.
Depending on the setup of your JIRA instance, you can use the following ways to authenticate users:
OAuth
Basic authentication
Cookie-based authentication
For getting a list of projects and other details, you can use this resource to find out what is possible.
An introduction to the JIRA API can be found here.

Adding Azure AD authentication To Existing MVC application That Uses Individual Accounts

I have an existing MVC application that authenticates users using their Google, Facebook or Microsoft (live) accounts. The application is derived from the basic MVC template, and the 'Individual Accounts' option was chosen. This all works fine.
We have had a request/requirement that we also support Microsoft Work Accounts, authenticated against Azure AD. We have developed a second test MVC application, using the 'Organisational Accounts' from the template and can successfully get the user details, including extended details such as Manager and Office from AD.
However we are struggling to understand how to combine the two options, and still get the extended details. We've added a OpenIdConnect option in the Startup.Auth file, pointing to AAD and they works, getting hold of the users main login only. We are struggling to then use that email to obtain the user's full information

SharePointOnline: How to authenticate user from Azure AD via CSOM

I have the following requirements:
Create a MVC site with Azure AD authentication.
Fetch lists from SharePointOnline/O365 which also uses the same Azure AD.
Fetch lists from SharePointOnline/O365 anonymously (is it even possible?)
Thanks to VS2015 the first step is trivial.
But how to authenticate the current user in SharePoint? User.Identity does not provide password, so I cannot use ClientContext.Credentials.
I heard there is some Token Provider but haven't found a working case yet. Can anyone help me out?
To get the list of SharePoint online from our MVC sites, you can consider using the Microsoft Graph REST API instead of CSOM.
You can refer here about the list operation of Microsoft Graph. However, since this API is in beta version, it is not recommend to use in the product version.
And you also can refer the link below to get started developing with Microsoft Graph:
App authentication with Microsoft Graph

Integrating Azure AD Access Control to social authentication for iOS app

I am writing an iOS app and using Azure Mobile Services for my identity management and DocumentDB for noSQL DB. However the only access control that I can see for DocumentDB is when we use Active Directory (which I am not currently using.)
I see from
https://azure.microsoft.com/en-us/documentation/articles/fundamentals-identity/
that there is a way of integrating access control service without using the active directory authentication.
However I can't find any documentation showing how this can be done. Has anyone done this? I am on a mac and developing for iOS.
The only documentation I see is for .NET and a ASP.NET MVC application: https://azure.microsoft.com/en-us/documentation/articles/active-directory-dotnet-how-to-use-access-control/
Also, does anyone know if Active Directory can be integrated with a JavaScript backend? All the docs show using Active Directory with a .NET backend.
Thank you.
Can you point to the docs you're referring to on securing DocDB with AAD?
You should be able to leverage resource tokens for Doc Db just fine, regardless of if you have an AAD identity. You can read more about resource tokens here: https://azure.microsoft.com/en-us/documentation/articles/documentdb-secure-access-to-data/.
To answer your question on AAD in the Node.JS backend, this is supported, but only through the server-orchestrated flow, as documented here: https://azure.microsoft.com/en-us/documentation/articles/mobile-services-ios-get-started-users/. If you were looking to use the ADAL library and get tokens on the client, this is only supported for the .NET runtime.
Also, for reference, Access Control Service is a specific service which is not currently receiving updates in favor of AAD which will take on that functionality. More about that here: http://blogs.technet.com/b/ad/archive/2013/06/22/azure-active-directory-is-the-future-of-acs.aspx

Authentication using Google OAuth2 from MVC5 Website Failing (GetExternalLoginInfo always null)

I’m following these instructions to create a simple MVC5 website that allows external authentication using Google and Facebook via OAuth2:
http://www.asp.net/mvc/overview/security/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on
I'm using Visual Studio 2015 Professional, targeting .Net 4.5.2, and all my nuget packages are up to date with the latest stable builds (as of 08/18).
Additionally, my project’s been set up to use https/SSL throughout.
I’ve got to the section ‘Creating a Google app for OAuth 2 and connecting the app to the project’ and have created a sample Web Application project in the Google developer console, with the Google+ API enabled - my list of enabled APIs are:
BigQuery API
Cloud Debugger API
Debuglet Controller API
Google Cloud Logging API
Google Cloud SQL
Google Cloud Storage
Google Cloud Storage JSON API
Google+ API
... basically the default ones with Google+ added.
I’ve added the Authorized redirect URI (https://localhost:44300/signin-google) Authorized Javascript origins (per previous with /signin-google removed) and to the Google project. I’ve also set a product name in the OAuth Consent Screen (but nothing else apart from my email).
I’ve not touched the generated code in the solution, other than to do the following:
In Startup.Auth.cs, uncomment the app.UseGoogleAuthentication section and add the client ID and secret from the Google project (Credentials section)
app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
{
ClientId = "xxxxx.apps.googleusercontent.com",
ClientSecret = "xxxxx"
});
Added Session["Workaround"] = "workaround"; to AccountController in the Post version of ExternalLogin
So I run the application and attempt to login via Google (using the button that appears on-screen). I get taken to enter my Google credentials, which I do successfully. However, on returning to my application what I’m seeing is:
The querystring returned from Google has error=access_denied attached to it (confirmed via Fiddler)
(Consequently?) the call to AuthenticationManager.GetExternalLoginInfoAsync(); in AccountManager always returns null, and I’m redirected to the login page again
I therefore never get the chance to associated the Google login with my application
I’ve also noticed in the Google developer console that there are zero default quota requests, and zero sign-in quota requests in the Google+ API usage section (even though I’ve been hammering this over the last couple of days).
I don’t know what to try next. I've taken a tour of the web looking at this and almost everything I’ve read has said that enabling the Google+ API, and/or setting a placeholder in the session should solve this, but neither option has worked for me.
Any ideas welcome.
Thanks
fiveeuros
So - I should have mentioned that I'm doing this at work, and sitting behind my corporate firewall.
Because this is what's causing the issue.
Further examination of the Fiddler logs showed a whole bunch of 407 Proxy Authentication Required responses.
So I deployed the app to Azure without making any code changes (I did change the google credentials to add the Azure URIs), and it worked straight up.
There are a bunch of other things to workaround with the proxy (remote debugging the Azure app, or connecting to the Azure database from my local SQL Server), but they're for me and the firewall team to work out. What I'm doing is really at conceptual stage so I can live with it as it is for now.
//fiveeuros

Resources