azure-active-directory

Azure Function with AD auth results in 401 Unauthorized when using Bearer tokens

我与影子孤独终老i 提交于 2020-06-22 07:56:52
问题 I have a very simple Azure function in C# for which I've setup Azure AD Auth. I've just used the Express settings to create an App registration in the Function configuration. public static class IsAuthenticated { [FunctionName("IsAuthenticated")] public static async Task<IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "options", Route = null)] HttpRequest req, ILogger log) { return new OkObjectResult("You are " + req.HttpContext.User.Identity.Name); } } When I access the

get group members from azure ad via microsoft graph

懵懂的女人 提交于 2020-06-22 04:02:40
问题 I am working in asp.net application Authenticate with external identity provider (Azure Active Directory) I want to get group members from azure ad via microsoft graph How can I do that ?? 回答1: Seems You are trying to get all group members from a specific group. Just Get the group Id that is Object Id on azure portal. See the below screen shot. Code Snippet : You could try following code snippet which work fine as expected. //Token Request End Point string tokenUrl = $"https://login

Azure AD B2C - CORS Policy Issue for Multi App Services

不羁岁月 提交于 2020-06-21 05:39:23
问题 The bounty expires in 3 days . Answers to this question are eligible for a +50 reputation bounty. immayankmodi is looking for an answer from a reputable source : Need to fix above issue on Azure. I've 2 projects: Project1 is main app ( localhost:4016 ) Project2 is child app ( localhost:4055 ) and sharing authorization token cookies between 2 projects. It's working fine locally but not working while hosted on Azure. Getting following error: Access to XMLHttpRequest at 'https://devplatform

How to get Group in Azure AD in Pulumi?

风格不统一 提交于 2020-06-17 15:52:18
问题 I'm trying to get a group in the Azure AD. var group = Output.Create( GetGroup.InvokeAsync( new GetGroupArgs { Name = "Administrators" })); PS C:\dev\___> pulumi preview Previewing update (dev): Type Name Plan Info pulumi:pulumi:Stack Frontend-dev 1 error Diagnostics: pulumi:pulumi:Stack (Frontend-dev): error: Running program 'C:\dev\___\bin\Debug\netcoreapp3.1\Frontend.dll' failed with an unhandled exception: Grpc.Core.RpcException: Status(StatusCode=Unknown, Detail="invocation of azuread

Powershell to get AD user disabled in the past 6 months?

僤鯓⒐⒋嵵緔 提交于 2020-06-17 09:59:26
问题 How to get the AD user that was disabled in the past 6 months and also the time stamp when it was disabled in dd/MM/yyyy format as.CSV file? Like using this Powershell https://docs.microsoft.com/en-us/powershell/module/addsadministration/get-aduser?view=win10-ps ? $paramhash=@{ UsersOnly = $True AccountDisabled = $True SearchBase = "OU=Employees,DC=globomantics,dc=local" } Search-ADAccount @paramHash | Get-ADuser -Properties Description,Department,Title,LastLogonDate,WhenChanged | sort

How to register your Azure resource as an Application in Azure Active Directory?

生来就可爱ヽ(ⅴ<●) 提交于 2020-06-16 18:00:30
问题 I have an Azure CDN. It has a custom domain, and I attempting to register my own certificate for HTTPS support. I am attempting to follow the instructions here: https://docs.microsoft.com/en-us/azure/cdn/cdn-custom-ssl?tabs=option-2-enable-https-with-your-own-certificate I have uploaded my Certificate to a Key Vault. That should be good. I am now trying grant my Azure CDN Profile access to my Key Vault in order for it to get the certificate. That is this step in the tutorial (Register Azure

Unable to Connect to Azure SQL DB from Azure App Service

老子叫甜甜 提交于 2020-06-16 17:05:31
问题 We have an ASP Classic web application running successfully in an Azure App Service that currently uses SQL Server Authentication to access the Azure SQL Database. We need to change the authentication to Active Directory user. We managed to make this application work from a developer’s workstation accessing the Azure SQL Database, see what worked and did not, below. * Does NOT work on desktop and Does NOT works in Azure Conportail.Open "Provider=SQLOLEDB; Server=tcp:.database.windows.net,1433

Outlook SMTP Oauth Send - Authentication Unsuccessful

本秂侑毒 提交于 2020-06-13 06:36:29
问题 I have been trying to implement email functionality in a legacy app using the Legacy Mail API to add OAuth support after getting a token through the Device Code Flow starting with the Microsoft Sample Project. Along that route I have added SMTP.Send and many other API permissions to find the missing piece. (Including { "User.Read", "User.ReadBasic.All", "SMTP.Send", "offline_access", "Mail.Send" } in fear of missing one) I have been testing with the MailKit library to build a proof of concept

Client Credential Gran Type Not Support with a Custom B2C Policy

安稳与你 提交于 2020-06-13 04:05:02
问题 I am trying to generate an access token from our policy but I am getting this error. AADB2C90086: The supplied grant_type [client_credentials] is not supported. This is a sample postman request POST /{tenant}/oauth2/token?p=B2C_1A_SignUpOrSignInWithAAD HTTP/1.1 Host: login.microsoftonline.com Content-Type: application/x-www-form-urlencoded Cache-Control: no-cache grant_type=client_credentials&client_id={client_id}&resource=https%3A%2F%2F{app_url}&client_secret={client_secret} but it works

Client Credential Gran Type Not Support with a Custom B2C Policy

萝らか妹 提交于 2020-06-13 04:03:59
问题 I am trying to generate an access token from our policy but I am getting this error. AADB2C90086: The supplied grant_type [client_credentials] is not supported. This is a sample postman request POST /{tenant}/oauth2/token?p=B2C_1A_SignUpOrSignInWithAAD HTTP/1.1 Host: login.microsoftonline.com Content-Type: application/x-www-form-urlencoded Cache-Control: no-cache grant_type=client_credentials&client_id={client_id}&resource=https%3A%2F%2F{app_url}&client_secret={client_secret} but it works