azure functions
40 TopicsAuthentication (EasyAuth) on Linux consumption plan
Is support for authentication (EasyAuth) on Linux consumption plan in the works? Is there an alternative right now? I'm currently utilising the premium plan to get the authentication functionality...fortunately I need the hot start for this use case, but there are other use cases coming up where a pure consumption plan approach would be more appropriate.5.5KViews2likes8CommentsBest way to secure Azure Function
So far, I am able to create azure functions that are accessible anonymously. However I'd like to secure those functions so that they only run from a specific Microsoft Flow. I am reading the docs and watching videos and am kinda lost on how to secure azure functions. What I did was I went to my function app, to Authentication / Authorization, and set the "App Service Authentication" to "On". I chose Log in with Azure Active Directory, and choose Advanced. In the client ID, I pasted the client ID that's added in app registrations. However I left the "issuer url" and "Allowed Token Audiences" empty as the docs aren't really clear on what these values should be. However when trying to execute the Azure function this way, am getting "id_token" is not enabled for your app. So I went to my app registration, and clicked on "Token configuration" from the left menu, I clicked on "Add optional claim" and chose ID and checked all the claims, and hit Add. But that didn't solve the issue. Is there a clear documentation of what should be done exactly? A lot of talking in the docs about theories and how authentication works but nothing practical to actually teach people to secure their functions step by step.3.7KViews2likes1CommentEnabling and disabling forwarding rule
Hello, We need to turn on a mail forwarding rule on a single mailbox, within 365. We looked at using a Azure Function App and copilot got us most of the way there but need some help with a 400 error. Failed to enable rule: The remote server returned an error: (400) Bad Request. The API authenticates and has the Mail.ReadWrite and Mail.Send and seems to be happy there. Is there a reason why this is giving a 400 error as all the details (I thought) were in order. # Azure AD App details $clientId = "your-client-id" $clientSecret = "your-client-secret" $tenantId = "your-tenant-id" # Function parameters $mailbox = "email address removed for privacy reasons" $ruleId = "086b4cfe-b18a-4ca0-b8a6-c0cc13ab963e3208025663109857281" # Provided rule ID without backslash # Get OAuth token $body = @{ client_id = $clientId client_secret = $clientSecret scope = "https://graph.microsoft.com/.default" grant_type = "client_credentials" } try { $response = Invoke-RestMethod -Uri "https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token" -Method Post -ContentType "application/x-www-form-urlencoded" -Body $body $token = $response.access_token Write-Output "Token acquired successfully." } catch { Write-Error "Failed to get OAuth token: $_" return } # Enable the existing rule $headers = @{ Authorization = "Bearer $token" ContentType = "application/json" } $body = @{ isEnabled = $true } try { $jsonBody = $body | ConvertTo-Json Write-Output "JSON Body: $jsonBody" $response = Invoke-RestMethod -Uri "https://graph.microsoft.com/v1.0/users/$mailbox/mailFolders/inbox/messageRules/$ruleId" -Method Patch -Headers $headers -Body $jsonBody Write-Output "Rule enabled successfully: $($response | ConvertTo-Json)" } catch { Write-Error "Failed to enable rule: $_" Write-Output "Response Status Code: $($_.Exception.Response.StatusCode)" Write-Output "Response Status Description: $($_.Exception.Response.StatusDescription)" if ($_.Exception.Response -ne $null) { $responseContent = $_.Exception.Response.Content.ReadAsStringAsync().Result Write-Output "Response Content: $responseContent" } else { Write-Output "No response content available." } } # Return response Write-Output "Script completed."Solved129Views1like3CommentsApplication Consent when all are blocked?
Hi, When the consents for Enterprise Applications are set into very restricted level: User consent for applications: Users can request admin consent to apps they are unable to consent to Then come the application xyz which needs to be registered into company's tenant, and when users are trying to do this, they just get the following: Or they go to the web services like Microsoft's own msrc portal, they get the following when trying to sign-in with they work accout: Is there a way to avoid these? And how such a consent should be done so that end users does not need to be disturbed, is there a way to Administrators to do this before hand for end users?1.4KViews1like2Comments