Sitecore 9.0 - Looking to implement Azure AD B2C - sitecore

Thank you for reading my question.
I'am trying to implement Azure AD B2C in Sitecore 9.0.2 version that being said i have used a sample code from Git Hub which implemented ADB2C using ASP.NET MVC. I created a feature project in Sitecore added all the files needed,built the solution and deployed it to Sitecore web root, resolved dll conflicts but still seeing one issue:
Sitecore have an older version of "System.IdentityModel.Tokens.Jwt" dll with class "System.IdentityModel.Tokens.JwtSecurityTokenHandler" which is no longer available in Version=5.2.1.0
Any help/guidance here to resolve this issue or is there any sample implementation available in Sitecore with Azure AD B2C.
Note: i'am not looking for Federated Authentication (Azure Active Directory) Azure AD
enter image description here

Steps to create Azure AD B2C :
Login to Portal.azure.com and create a New Tenant (working directory
with subscription)
Link your Subscription
Create/Register an Application (Client)
Create Client Secret, User Flows, Custom policies reference
Create an MVC application which can generate Azure Login Url reference
Deploy your code to sitecore root & browse the site.
Open Issues : Users need to be created in Sitecore manually even after having Virtual User creation in place.

Related

Creating a Mult-Tenant OAuth Client App

Essentially, I'm wanting to create an Oauth Client as an App so I can get data from Dynamics for multiple customers. Does anyone know if this is possible to do in AppSource or do you know of another way?
I have a service that will be served in a cloud different than Azure so there really isn't anything for me to submit as an App and I really don't want every customer to have to setup their own App that gives my service the privileges/access it needs, but it's looking like I may have to.
It sounds like you'll want to register an app with Azure AD (the OAuth2.0 service/identity provider for work and school accounts), and create a multi-tenant app. Then you can configure this app in the Azure Portal to get permissions to the APIs the app wants tokens to call (in your case Dynamics or the Microsoft Graph).
Once this app is written, you can code up your app using one of the Azure AD Auth Libraries. Here's some sample code for a .NET web API. You can find more code samples on Github and search active directory. Moreover, the Azure Active Directory Developer Landing Page is a great place to look for more resources on doing all of this.

Azure directory authentication in Sharepoint App

I've being trying to fix this problem for a week without luck. I am trying to access a sharepoint application hosted on azure that has the option "Log in with Azure Active Directory" enabled on azure .The app works perfect in sharepoint withouth that option in azure, what am I doing wrong?
Also, consider that my app uses the rights Web amd User Profiles as "read", stated on AppManifes.xml. Like I said, the app works well when the "Log in with Azure Active Directory" option is not enabled.

Sharepoint 2013 provider hosted app in ADFS base sharepoint site

We have Sharepoint 2013 single server farm and another one server with ADFS 2.0
Now configure sharepoint site with below steps:
Install ADFS 2.0
Configure ADFS with the web application as a relying party
Configure SharePoint Server 2013 to trust ADFS as an identity provider
Configure the web application to use claims-based authentication.
Demonstrate SAML-based claims authentication from SharePoint web application
and it will working fine with sharepoint.
Now we add one provider hosted app with this sharepoint site but we get some error.
1. When deploy from VS2012 it will give an error
"Error occurred in deployment step 'Install app for SharePoint': The System Account cannot perform this action."
second way we are upload app file into app catalog and try to add this app in to sharepoint site.
Error : “Application error when access /_layouts/15/appInv.aspx, Error=This App is not installed on this site. at Microsoft.SharePoint.Lifecycle.SprocWrappers.GetAppInstanceById(SqlSession dbSessionWrapper, Guid siteId, Guid webId, Guid instanceId, Int32 lcid) at Microsoft.SharePoint.Administration.SPAppCatalog.GetAppInstance(SPWeb web, Guid appInstanceId) at Microsoft.SharePoint.ApplicationPages.AppInvPage.SetControlStateUsingAppInstanceId(String appInstanceId) at Microsoft.SharePoint.ApplicationPages.AppInvPage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)”
This issue may be due to claim base authentication in sharepoint 2013 site. because this app will working fine in windows base authenication sharepoint site.
I faced the same issue but I was not using ADFS. For me the solution was to use another account for installing the High Trust Provider-Hosted app. The server farm account should not be used for other services. Try using another account that has required permissions.

Update DotNetNuke user from another web application

DNN Ver 5.6.7
.NET 3.5
Anyone know of a way to access/update user accounts on a DNN site from another web application?
My goal is to allow customer service to update an employee's DNN password from an intranet app (that includes some other employee related, non-DNN data), but I'm not having any luck. I tried adding a simple web service to a virtual directory (as described here) to the DNN site, hoping the web service would then have access to all things DNN, but I'm not able to create instances of the UserInfoController - it's not instantiating the MemberProvider object.
UserController objUserController = new UserController();
UserInfo objUser = objUserController.GetUser(portalId, userId);
Each time, the objUserController object shows null for DotNetNuke.Security.Membership.MembershipProvider
Both the DNN site and our internal web app are hosted on the same server. Any suggestions are appreciated.
EDIT: In addition to all the DLLs in the DNN bin folder, I also copied everything from the DNN web.config into my web service web.config that looked DNN related
if your WebService is inside DNN, this code must work:
UserInfo objUser = UserController.GetUserById(DotNetNuke.Entities.Portals.PortalSettings.Current.PortalId, userId);
If your intranet app is running on ActiveDirectory, I would look at some of the available ActiveDirectory integration modules.
If you can wait until DotNetNuke 6.2 comes out, it will include a built-in services layer which will allow you to authenticate and interact with DotNetNuke objects like users.
I did this via http://iweb.adefwebserver.com/.
I added a web service method that took advantage of all the user related features in the DNN API (UserInfo, UserController, RoleController, etc.).

Using a Web Service to access data outside MOSS using AD for authentication

So here is the scenario:
I have a MOSS 2007 box and I want my clients to be able to access a SharePoint site via the internet. I am told that I will be using an IPA and AD for authentication. However I have a DB outside of SharePoint that holds various business data and I want to use Web Services to access the data, manipulate it, and send it back to SharePoint via web parts.
The issue is that, from what I understand, I am going to have to authenticate the AD user every time a request to the Web Service happens. Obviously I dont want to do this every time because they have already authenticated to get onto the site, however I do want each call to have some form of security so its not open calls to my db. I do plan on having other applications access this service outside of SharePoint, so I dont want to have to reinstall the service for each application or even again.
Has anyone had to perform this task or something similar or do you have any suggestions on how to do this?
Thank you in advance and happy coding!
Why not just deploy the webservice to Sharepoint using a Sharepoint solution and a Feature.
That way it will be running under the sharepoint app pool and all authentication is done by sp.
Edit:
Seeing that SharePoint should not be in "control" (as stated in the comment), you should create the webservice, and run the application it's under in as using Windows Authentication. IMHO you should create a WCF Service. The, using the information found in this article you make the Service authenticate users against the AD usergroups they are in. see the "Security: Authentication" section of the article.
Then in Visual Studio you create a webpart and add a service reference to the project, pointing to your newly created Service. Have the webpart perform the needed logic (i.e. display data etc.)
Deploy the webpart to SharePoint using a SharePoint solution (.wsp files, created with WSPBuilder). Google for SharePoint + wspbuilder + tutorials. The solution should contain 1 feature to deploy the webpart. WSPBuilder integrates with VS and allows for the creation of WSPBuilde project. add a webpart feature item to the project (it will create the xml (deployment related) and code file for the webpart.