azure-ad-b2c

Creating test users for Azure AD B2C

我的未来我决定 提交于 2019-12-04 10:46:25
Is there a way to programmatically create users for testing with Azure AD B2C? The only way to create users that I am aware of is through website signup. Am I missing something? Yes, Azure AD B2C Graph API allows CRUD operations on users. You can create a user by sending a "POST" request to the /users endpoint. The following documentation demonstrates this with a "B2CGraphClient" utils written in C# : Azure AD B2C: Use the Graph (see GitHub link in the page to download the sample code) Please note there are two types of user account in Azure AD B2C : "local accounts" and "work or school

Hybrid authentication scenario - Azure AD B2C and Azure AD

吃可爱长大的小学妹 提交于 2019-12-04 08:15:17
I have this scenario where we have to authenticate corporate users via Azure AD, but the external users via Azure AD B2C - all from the same login screen. There are a few web applications which will share this capability. The applications come from various technology stacks, ranging from .Net to Java-Spring + Angular 2. What is your recommended approach for this? Apologies, if this question has already been asked and answered, but couldn't find much guidance on this. Will MSAL library solve this? Besides, there aren't any MSAL implementation for Java yet. Will Azure AD B2C Premium support this

What use are 'Scopes' in Azure B2C Authentication?

大城市里の小女人 提交于 2019-12-04 07:29:09
I don't understand how the 'Scopes' in Azure B2C are supposed to be used. They are associated with an API, but not a user. I'm sure I'm missing something, but I see no practical use for something associated with an API. I've used and implemented Claims-based authentication based on a user's role in the database. For example: ordinary users of an API should not have the authority to delete an object, but administrators should have the authority. Does someone have a practical example of how these B2C 'Scopes' can be used to limit a users access to the API? They are associated with an API, but

Authentication on angular spa using msal.js

不想你离开。 提交于 2019-12-04 06:01:20
my angular app has 1000s unique routes and users should be able to click on login button from any of those pages. Have implemented msal.js basing on this sample : https://github.com/Gimly/simpleAngularAzureB2C/blob/master/src/app/authentication.service.ts I am getting following error when calling login method: AADB2C90006:+The+redirect+URI+' http://localhost:39579/unique-uri '+provided+in+the+request+is+not+registered+for+the+client+id+ Is there a way to get around this? Thanks! By default, the Msal.UserAgentApplication constructor sets the "redirect_uri" request parameter to the current URL,

AD B2C forceChangePasswordNextLogin for user flow “Sign in v2” doesn't initiate a password reset and prevents a successful login

你。 提交于 2019-12-04 05:53:06
I am creating new users in Azure AD B2C using the graph client api. The json i send to the api looks like the following: { "creationType": "LocalAccount", "passwordProfile": { "password": "a:898;keJPpN/69X", "forceChangePasswordNextLogin": true }, "passwordPolicies": "DisablePasswordExpiration", "objectId": null, "accountEnabled": true, "displayName": "John Doe", "mailNickname": "john.doe", "signInNames": [ { "type": "emailAddress", "value": "john.doe@provider.com" } ] } The user is then created correctly. However, once I try to login with the newly created user using the flow "Sign in v2", I

How to get/set custom Azure Active Directory B2C user attributes in ASP.NET MVC?

限于喜欢 提交于 2019-12-04 05:17:19
问题 I have added a custom Organization field as a User Attribute in my Azure Active Directory B2C tenant, like so: I am using the Microsoft Graph .NET Client Library to manage users in Azure Active Directory B2C and would like to use something similar to the following code to set the user's custom Organization field and the user's built-in Email Addresses field. await graphClient.Users[user.Id].Request().UpdateAsync(new User() { Email Addresses = new StringCollection("myemail@mydomain.com")

Can I use “Resource Owner Password Grant” flow with Azure AD B2C

本秂侑毒 提交于 2019-12-04 05:12:15
问题 I need to be able to get an identity/access token to a backend API for a native client, where the native client must use native UI to collect username and password. I want to use Azure AD B2C but I cannot get clear, explicit info if the Resource Owner Password Grant flow is supported. Is it possible to get a token from Azure AD B2C by programmatically posting username and password somewhere? 回答1: Azure AD B2C does not support the "Resource Owner" password grant yet. You can support this

Receiving 403 error when accessing Azure function app locked down by Azure AD B2C

雨燕双飞 提交于 2019-12-04 05:01:14
We are using AD B2C for authentication on our web app. Last week we started receiving a 403.76 when calling our APIs that are hosted in Azure and locked down by Active Directory using our AD B2C tenant. We haven't changed any config settings in AD when the change occurred. We rolled back all of our code which didn't help. We verified that our token is valid in jwt.io. We confirmed that our audience is correct and permissions was set properly in app registrations. We can see the easy auth error 403.76 when going in to "Diagnose and solve problems" section of the function app and drilling into

Upload Azure AD B2C Custom Policy Via Powershell

廉价感情. 提交于 2019-12-04 04:11:53
问题 How can I upload custom policies via power shell? 回答1: Azure AD B2C now supports PowerShell cmdlets Azure AD Preview module documentation See medium blog Quick Start Launch Power Shell and try below commands > Install-Module -Name AzureADPreview > Connect-AzureAd -tenantId <yourtenantname> -accountId <yourAlias@contoso.com> > Get-AzureADMSTrustFrameworkPolicy > Get-AzureADMSTrustFrameworkPolicy -Id B2C_1A_signup_signin -OutputFilePath C:\B2C_1A_signup_signin.xml > New

Azure B2C client credentials grant

匆匆过客 提交于 2019-12-04 03:03:50
问题 I’ve implemented Azure B2C for user login/logout and can get the id_token and pass it to my web API for authorization, all works well. Now, I have some Web API methods that should be only accessed by the client web application (ASP.NET 4.6) which means OAuth 2.0 "client credentials grant". I’ve done a lot of research and the closest I could find is this quick-start which uses ADAL in a B2C application to call Graph API. I followed along and got to the point where I’m trying to get the client