Azure conditional access by device name - azure

I want to limit access to Azure P2S VPN by computername. What I did:
I configure one conditional policy to block all users(Pol1).
Second conditional policy(Pol2):
All Users
In Cloud apps or actions I selected Azure VPN
Conditions - Filter for devices - Include filtered devices in policy
displayName contains MyComputerName
deviceID equals MyDeviceID (I got it using dsrgcmd /status)
Access controls -Grant access - Require multifactor authentication
When I am trying to connect with Azure VPN I see in Sign-in logs Pol1 failed. (Block access for all). Pol2 is Not Applied. Why? I specified to check out for Name or ID...
Next step instead of second policy I created a policy that Grant only for following:
Require multifactor authentication
Require domain-joined device
It doesn't work. I joined my computer to Azure AD - doesn't help. I still getting:
Not satisfied
Require multifactor authentication
Require domain-joined device
I am out of ideas... Any help will be appreciated!

I tried to reproduce the same in my environment and I got the results like below:
I have configured point to site vpn and connected successfully like below:
To Set MFA make sure. To set User assignment required as Yes to limit sign-in to only users that have permissions to the Azure VPN like below.
Enterprise application --> Azure VPN --> properties --> User assignment required. -> save
I have created group, added a limited member to access
In conditional access policy ->Assignments -> Users and groups -> include -> Add group like below
In Grant Require multi-factor authentication
In the Enable policy section -> click ON -> Create
Now when I try to connect with added group member it connected successfully.
When I try to access with another user it restricts like below
Reference:
Azure AD Authentication for Point to Site (P2S) VPN - Cloudthat | CloudThat
Update
I tried in my environment According to your scenario i have created policy 1.
Try to give block access for all user and in condition -> Filter& device -> exclude filtered device and provide your device id like below:
In policy 2, Now I have given Grant access for all user and you can Add device id and display name in include filtered device and grant access like below.

Related

Azure AD: Your sign-in was successful but you don't have permission to access this resource

I created an account on Azure Active Directory.
It works fine on my end and can able to login using the account I recently created.
I send the test account to the other user which is based on UK and it showing an error below.
I am residing in PH, and he is residing in UK.
Your sign-in was successful but you don't have permission to access
this resource
Below is the API Permission on our App Registration in Azure AD.
Anyone knows on what particular settings do I need to change anything?
Azure AD: Your sign-in was successful but you don't have permission to access this resource:
From Azure AD through portal, get to
 Security > Conditional Access > Named locations.
Try adding a new location.
If you know the precise IPv4 address ranges that make up that country or region, you can add them as IP ranges for that particular country/region and save it.
Note:- Adding unknown areas is an option if you select Countries/Regions.
References:
MSDoc
You can also create a conditional access policy as per industry standards Steps to achieve the same.

How to block access to group of users with directory roles

In my tenant, I want to restrict access to few users to my application even they have directory admin roles.
I'm thinking of implementing conditional access policy. I have premium p2 license, is this sufficient to work with conditional access?
How to create policy to restrict access to admins? Any help is appreciated
I tried to reproduce the same in my environment and got below results:
I have created one Azure AD group named AppAdminCA by adding 'Application Admin' role to that group like below:
This means every user in that group has 'Application Admin' role. Note that, Application Admin role don't have access to modify conditional access policies.
To restrict access for these users to a specific application, you can create "Conditional access policy" like below:
Go to Azure Portal -> Azure Active Directory -> Security -> Conditional Access -> Policies -> New policy
In Users field, you can select either Users with Directory role or the above created group like below:
In Cloud apps field, select that particular application to which you want to block access as below:
In Access controls field, select Block access and click on Create by enabling the policy:
You can find the created conditional policy here:

Azure data factory pipeline showing RequestingConsent forever

I am unable to fix the "Requesting Consent" status for an azure Data Factory Pipeline querying some Office365 (Graph) simple data (i.e. smtp addresses and UPN of my colleagues).
Can you suggest me something to check ?
I am adding 2 pictures showing where "Graph Data Connect" is easily enabled, and the always empty PAM (Privileged Access Management) portal.
New image: Graph Data Connect configurator
New image: Empty PAM portal
As per the error we could see its a permission issue where you need to be Granted Permission before querying in Graph to pass simple data (i.e. smtp addresses and UPN of my colleagues).
Here, are the steps how you can add permissions:
You have to create a API permissions service, you have to Grant Permission for reporting API, must allow your app the appropriate
permissions based on the API you wish to access.
Next you could navigate to API Permission in the left column under the Manage.
Then you can click on +Add Permission as shown in bubbles in the Snip.
Please grant the permissions Directory.ReadWrite.All and Users.ReadWrite.All.
At last I found what was missing: it was a licensing requirement, but nothing warned me about this in PAM page. Simply nothing was listed in it.
If you like, here are the requirements nowadays.
Have a nice day to everyone !
Julian

How AzureAD knows that device is registered or not?

We are trying to clear some things on conditional access using intune and azureAD. I have enrolled my device with intune and also pushed Microsoft team app using play store account in my device.
When i trying to login into microsoft teams using AzureAD, how AzureAD is getting device related information and using that information decision will be taken.
so basically we want to know data flow between azureAD, device and intune at the time of login.
So to summarize in a statement, conditional access policies are ANDed i.e. it enforces policies in 2 steps and if all the conditions are not satisfied, the block takes precedence and the user/device needs to satisfy all the conditions set forth to get access to the app/online service to which the device/user has requested.Refer to the below article for more insights
https://www.vansurksum.com/2020/05/25/may-2020-update-of-the-conditional-access-demystified-whitepaper-workflow-cheat-sheet-implementation-workflow-and-documentation-spreadsheet/

Azure AD User auto provision in Salesforce

I have one Salesforce profile and one permission set in Salesforce. As per the requirement, there are two user personas in our Salesforce application.
Persona 1 -> SF Profile
Persona 2 -> SF Profile + Permission Set
To achieve the above configuration using Azure AD auto-provision, we have created two security groups and added relevant business users into those two groups. Currently, we struggling to determine the best approach on how to assign the Salesforce permission sets to the users in the "Persona 2" user group.
You already have Single Sign-On configured in SF, right? At the bottom of the page there's place for just-in-time (JIT) login handler class.
You'd have to write that class but there are some online examples for ... implements Auth.SamlJitHandler. Once you have the class skeleton ready - use System.debug(JSON.serializePretty(attributes)); or something similar to see what Azure Active Directory sends. Last time I used this AAD couldn't send groups info but it could send role(s). So we determined unique sets of users and if role is X - check if the user has permission set X assigned and if not - assign it. We then expanded it to other SF features (groups, queues, user role, profile...). PermissionSetAssignment is the table you need.
If you don't want to write code for this there's always Identity Connect but that's paid and on-premise agent program (I think). No idea if it can work with AAD. But you'll get simple interface for the mapping.

Resources