Is it possible to sign in to Azure AAD using a logic app or feature?

Morning people

My challenge is to deploy SSO from a third-party application that uses a proprietary sign-in feature to an Azure AAD-authenticated web application.

When you click the link, the third-party app triggers the POSTING of a signed SAML token with a user ID to the endpoint that I need to configure in Azure.

That is the part that is fixed and beyond my control. I need to find a way to authenticate the user based on this POST request. I searched for if for a long time and apparently can't find a method for it.

The theoretical Azure endpoint needs to validate the token, analyze the user ID, match it to the corresponding AAD account (which we sync with the third party so it can be guaranteed to exist) and return a session cookie and return the URL as POST- Redirect Answer This is then redirected to my Azure web application using the newly created AuthN session.

The question is, is there an Azure feature that can handle it? I checked
Implicit OAuth 2.0 grant flow,
OAuth 2.0 Auth Code Grant,
OAuth 2.0 on behalf of Flow,
Issuing OAuth 2.0 client credentials.

And they don't seem to be able to create an AAD session for a user without a username and password.

I hope that makes sense. If I approach the problem incorrectly, I am happy to accept criticism. I am very new to Azure!

Javascript – (Js) Schedule Conflict Detection Algorithm Logic & Length

Getting check boxes is a bit verbose. Instead, use a single selector to get all of them instead of having to select each one individually.

const daysOfWeek = {};
for (const input of document.querySelectorAll('.form-group > input(type="checkbox")') {
  daysOfWeek( = input;

Instead of examining each variable to see if it is enabled, loop through this object to see if values ​​have been checked.

Think to avoid the hell of indentation returnearly if an error occurs instead of a very big one else block if there is no error.

Your savedSchedules is an object that is never reassigned:

var savedSchedules = {};

So it will always be true – that if (savedSchedules && Check is superfluous as it will always be true.

It is also not necessary to check how many keys the object has beforehand – just go through them all regardless. If there are none, no conflicts are detected. So the Object.keys(savedSchedules).length >= 1 can be removed.

Object.entriesThe callback accepts an entry array parameter of the key and value. Since you already have the value as a variable, you do not have to select it again by going through them (key)::

Object.entries(savedSchedules).forEach(function((key, value)) {
  schedule_ = savedSchedules(key);

simplified to

Object.entries(savedSchedules).forEach(function((key, schedule_)) {

But since you have the schedule name (the key) you can also remove and use it Object.values instead:

Object.values(savedSchedules).forEach(function(schedule_) {

But you're trying to find out if there are any any Conflicts, it would be better to short-circuit if a problem is found. Consider using a for Loop instead. If a problem is found, notify the user and return.

The underscores after the variable names are confusing – they do not match a convention I know. It looks like you should distinguish the object of a single schedule from the day and the object value for the day. I think it would be appropriate to explicitly note this in the variable names, e.g. schedule, day, and dayObj.

Also since you are using Object.entriesYour environment supports ES6 – you should always use it in ES6 const Never declare variables, if possible var (and let only if you need to reassign).

The startTime The variable name (which comes from the input) is somewhat unclear once you are deep in the review phase and compare with it value_.StartTime Variable names. You might call the input variable inputStartTime (and the same for endTime) to reduce possible confusion?

The conflict checker is a decent section of code that is likely to deserve to be in its own role. This way, you can get a decent overview of the entire click process from the click listener without having to scroll through large amounts of code to get a general idea.

Assign to onclick should usually be avoided. It can work when it's done once, but if each other Code follows the same bad practices and always tries to do the same. Your previous listener will be overwritten. It is best to always use it addEventListener instead.


const daysOfWeek = {};
for (const input of document.querySelectorAll('.form-group > input(type="checkbox")')) {
    daysOfWeek( = input;
const getConflicts = () => {
    for (const schedule of Object.values(savedSchedules)) {
        // Loop through the schedule (key_ = 'Name', 'Sunday', ...)
        for (const (day, dayObj) of Object.entries(schedule)) {
            // Only check if weekday has a time value and weekdays that are selected
            if (day === 'Name' || !dayObj || !daysOfWeek(day).checked) {
            // if there is conflict, return it
            const conflict = checkForConflict(dayObj.StartTime, dayObj.EndTime, inputStartTime, inputEndTime);
            if (conflict) {
                console.log('Conflict Detected');
                const conflictData = (day, `Start: ${dayObj.StartTime}/${inputStartTime}`, `End: ${dayObj.EndTime}/${inputEndTime}`);
                return `There is a scheduling conflict ${conflictData}:  - Cannot proceed...`;
saveButton.addEventListener('click', () => {
    // Check that fields are filled
    if (!scheduleName || !inputStartTime || !inputEndTime || Object.values(daysOfWeek).every(input => !input.checked)) {
        warningMsg.textContent = 'All required fields must contain data';
    // Check for Schedule Conflicts
    const conflictsMessage = getConflicts();
    if (conflictsMessage) {
        // Handle Conflict Resolution -> Overwrite Schedule, etc
        // Probably CALL A FUNCTION HERE, don't write it all inside this click listener
    // Save the Schedule

    // ...

The generation of schedule Object doesn't appear, but it would be great if you didn't have to if (day === 'Name' check – Instead of combining the schedule name with the day key, you should put the days in a completely separate property, e.g.

  scheduleName: 'schedule-1',
  days: {
    Sunday: ...
    Monday: ...

Algorithms – What is the logic behind this to determine the probability of comparing two elements in a randomized quick sort?

Why do we consider the array sorted?

     {z1,z2,...,zn} zi being the ith minimum element
    --P(Zi is compared with Zj)                                 |
   |                                                            |
   |                                                            |
   |-----> We are considering                                   |
   |        Zij = {Zi,Zi+1,...,Zj} which is a subset of --------
   |------ Aren't we considering a very specific case??

And the probability of 1 / (j-i + 1) -> total no. of elements in the
Subset is also set for
specifically i and j

When considering the probability of comparing zi, zj, the subset
what should be partitioned can be anything and of any size …

The randomization condition may actually include everything
Account but i don't understand it …

For reference, I add the relevant pages from INTRODUCTION TO 3RD ED– CLRS ALGORITHMS

PAGE 182
PAGE 183
PAGE 184

Logic – Does Godel's incompleteness theorem only prove that some self-referential sentences are not provable?

It shows that the sentences of the form $ forall x, neg Dem (x, sub (n, y, n)) $ are true but unprovable where $ y $ is the Godel number assigned to the symbol $ Y $ in arithmetic and $ n $ is the Godel number of the sentence $ forall x, neg Dem (x, sub (Y, y, Y)) $

Let's assume for some $ y $, the sentence $ forall x, neg Dem (x, sub (n, y, n)) $ has the godel number 1000. Then follows a true but unprovable property of the number 1000:

"The number 1000 can never be at the end of a sequence of natural numbers $ x_ {k}, k = 1,2,3, …. n $so everyone $ x_ {k} $ is either a Godel number of an axiom or a sentence that can be derived logically from the axioms. "

However, properties like this are a very narrow class of properties of natural numbers. Is that an arithmetic property at all? I ask this because this property does not involve arithmetic operations like addition, multiplication. Instead, the number is decoded into a symbolic language and rules for the logical derivation are used. Arithmetic properties are something like & # 39;$ forall x, 10x neq 5, x in Z $& # 39;

Even though this is accepted as an arithmetic property, it is a very narrow class of arithmetic property (something we are not interested in). Does the incompleteness theorem say anything about non-self-referential properties of numbers?

8 – Add and combine the Vue JS logic to Drupal

I want to control the functionality of my Drupal menu with Vue JS.

Could decoupled blocks: Vue.js be a good place to start?

I thought it was possible to render the content of block--system-menu-block.html.twig or menu.html.twig into a Vue component. Then I can build my Vue functionality with my Drupal blocks in these Vue components.

I'm right. is that a good place to start? Or am I wrong and are there better solutions?

Logic – examples of large conjunctive normal forms

At the moment I am learning something about the conjunctive normal form in a course on logic for computer science. I read the Wikipedia entry on this topic and came across the following:

Typical problems in this case are formulas in "3CNF": conjunctive normal form with no more than three variables per conjunction. Examples of such formulas that occur in practice can be very large, for example with 100,000 variables and 1,000,000 conjunctions.

There is no source for this, and I am looking forward to the "practice" referred to here. What kind of problems lead to these large amounts of conjunctions? and can someone point me to some examples?

Many thanks.

I need help with my logic (resizing an image)

Hi Guys!!

I am trying to insert PHP code to resize an image.

Basically, users upload an image. And this image is pasted into a PDF document, but I have to limit how big (pixels) this image is. If the height is too high, the content is moved to the 2nd page. What I don't want

I currently have this code that works to some extent, but I want the width of the image to be more than 80 which is perfectly fine as it doesn't push the page down:

But then again, I want to make sure the width doesn't exceed 480 pixels if I want to make it smaller.

As if I want to limit the height to 80 and the width to 480 if it is larger than the aspect ratio (without distorting it) to scale to it. :(

Any help or advice would be greatly appreciated.

        function imageResize($imageResourceId,$width,$height) {
            $ratio = $width/$height; // width/height
            if( $ratio > 1) {
                $targetWidth = 80;
                $targetHeight = 80/$ratio;
            }else {
                $targetWidth = 80*$ratio;
                $targetHeight = 80;
            imagecopyresampled($targetLayer,$imageResourceId,0,0,0,0,$targetWidth,$targetHeight, $width,$height);
            return $targetLayer;



Reference Request – Contrasting Theorems in Classic Logic and Constructivism

Thank you for your reply to MathOverflow!

  • Please be sure answer the question. Provide details and share your research!

But avoid

  • Ask for help, clarify, or respond to other answers.
  • Make statements based on opinions; Support them with references or personal experiences.

Use MathJax to format equations. MathJax reference.

For more information, see our tips on writing great answers.