azure-ad-b2c

How to get Authorization Code from Azure App using HTTP Request in C#?

这一生的挚爱 提交于 2021-02-11 15:06:45
问题 I have created a .Net Application and to access certain outlook graph API's i need to fetch the access token and to get this access token i want authorization code which need to be passed. As far as the article for Authorization Code Flow , I have seen examples where we can get the authorization code by using the browser, whereas, in my case i want to retrieve the auth code within the application. Is there any way we can achieve this? 回答1: How to get Authorization Code from Azure App using

Creating Azure AD B2C Social Account using graph API

◇◆丶佛笑我妖孽 提交于 2021-02-11 13:01:47
问题 I have added google and facebook as Identity Provider for my Azure AD B2C tenant . Now I want to create social users for both google and facebook using azure ad graph api . In api documentation it is mentioned that "userIdentities" is required attribute which is having to sub attributes "issuer" and "issuerUserId" . for "issuer" it is quite clear what should be the value , but am not able to find how to get "issuerUserId" for identityProvider. It is described as "The unique user identifier

Azure: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:unable to find valid certification path toRequestedTarget

♀尐吖头ヾ 提交于 2021-02-11 12:29:37
问题 We have an application hosted on intranet and we are trying to configure Azure SSO for the same. The login page is getting redirected to Microsoft login portal and we are receiving the authorization Code. But when we try to post a request back to Microsoft to gain the token, we get this particular error. **sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Active Directory B2C Redirect URI With Angular App

柔情痞子 提交于 2021-02-10 14:37:03
问题 We are using the MSAL service with an Angular App we built to use our AD B2C Login and Authentication. The problem we are running into is that the Angular App has many routes, several of them are parameterized and can have n number of possibilities. We set up the MSAL Service in our Angular like: B2CAccessTokenKey = 'b2c.access.token'; tenantConfig = { tenant: 'deepdivebioportal.onmicrosoft.com', clientID: 'xxxxxx-xxxx-xxxx-xxxx-xxxxx', signInPolicy: 'B2C_1_signin', signUpPolicy: 'B2C_1

Howto Enable Email Verification in Azure AD B2C

人走茶凉 提交于 2021-02-10 06:56:16
问题 How do I enable email verification in B2C w/ custom policies? In an attempt to reverse engineer it, I tried disabling it in a built-in policy and downloaded the policy. I tried adding that metadata item to my self-asserted technical profile but that didn't work. Reverse Engineer Test | Built-In Policy <TechnicalProfile Id="SelfAsserted-Input"> <Metadata> <Item Key="EnforceEmailVerification">False</Item> </Metadata> </TechnicalProfile> My Self-Asserted Technical Profile <TechnicalProfile Id=

CORS problem with B2C and Azure App Service

谁都会走 提交于 2021-02-09 11:01:28
问题 I have enabled CORS in my ASP.NET/Angular application by using AddCors and EnableCors in controllers. My application is communicating with AD B2C pages. After build I have this error in the console : Access to XMLHttpRequest at 'https://XXX.b2clogin.com/ (redirected from 'https://XXX.azurewebsites.net/User/Info') from origin 'https://XXX.azurewebsites.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Startup.cs : services

CORS problem with B2C and Azure App Service

和自甴很熟 提交于 2021-02-09 11:01:04
问题 I have enabled CORS in my ASP.NET/Angular application by using AddCors and EnableCors in controllers. My application is communicating with AD B2C pages. After build I have this error in the console : Access to XMLHttpRequest at 'https://XXX.b2clogin.com/ (redirected from 'https://XXX.azurewebsites.net/User/Info') from origin 'https://XXX.azurewebsites.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Startup.cs : services

Azure AD B2C vulnerable to Open Redirect?

故事扮演 提交于 2021-02-08 15:00:43
问题 I am using OWIN & OpenId to authenticate users for my web application using Azure AD B2C, the Startup.Auth.cs has code like so : app.UseOpenIdConnectAuthentication( new OpenIdConnectAuthenticationOptions { MetadataAddress = string.Format(AadInstance, Tenant, policy), AuthenticationType = policy, ClientId = clientId, Authority = authority, PostLogoutRedirectUri = postLogoutRedirectUri, RedirectUri = postLogoutRedirectUri, Notifications = new OpenIdConnectAuthenticationNotifica.... On signout,

Query String Claims Resolver with SAML2 B2C Custom Policy

左心房为你撑大大i 提交于 2021-02-08 11:15:24
问题 Is it possible to read a custom query string parameter from a SAML2 relying party request?. Using the {OAUTH-KV:any custom query string} does not work. example: https://mytest.b2clogin.com/mytest.onmicrosoft.com/B2C_1A_TEST_SAML/samlp/sso/login?myparameter=true I need to read the "myparameter" value into a claim. 回答1: Hope you are trying to do the following: <InputClaims> <InputClaim ClaimTypeReferenceId="givenName" DefaultValue="{OAUTH-KV:name}" /> </InputClaims> To get the value from the

Azure AD B2C Graph Api - Get/Set profile picture

流过昼夜 提交于 2021-02-08 07:09:09
问题 For one of my dashboards I want to show the user their profile picture for obvious personalisation reasons, and offer them the possibility to change it. Most blog posts and articles on the Microsoft Docs site name a variety of endpoints I can leverage to get this data, but I'm just unable to get this to work with a simple postman call. Since I can't even get the photo, I wouldn't know how to change (update) it either. The following endpoints don't work: GET https://graph.microsoft.com/beta