#URL
https://login.microsoftonline.com/{Tenant ID}/oauth2/v2.0/token
#METHOD
POST
#X-WWW-FORM-URLENCODED
#X-WWW-FORM-URLENCODED
grant_type=client_credentials
&client_id={Client ID}
&client_secret={Client Secret}
&scope=https://management.azure.com/.default
Tuesday, February 18, 2025
How to Obtain an Access Token for Azure Cost Management API Calls
Thursday, September 14, 2023
Resolve Azure Data Explorer error - Principal 'aaduser=xxx' is not authorized to perform operation 'VersionShowCommand'
Sunday, March 6, 2022
Video - Govern SharePoint file upload with Azure Conditional Access
Tuesday, March 1, 2022
Block file upload to SharePoint Online using Azure Conditional Access with custom policies
In this article I'll explain how to achieve that using Azure Conditional Access Policies and Defender for Cloud Apps policies
Steps in Conditional Access Policies
Step 01: Navigate to Azure AD and then to Security Section
Step 02: Navigate to Conditional Access Policies
Step 03: Create a new policy
Step 04: Assign Users. I've assigned all users
Step 05: Select SharePoint Online
Step 06: Navigate to Session section and select Use conditional access app control and use custom policy option
Then I will click on configure custom policy section. It will bring me to Microsoft Defender for Cloud Apps application.
Steps in Microsoft Defender for Cloud Apps
Step 01: You can see SharePoint online in conditional access app control apps section, we created this in previous step in Azure AD
Step 02: Navigate to Control, Policies and create a new policy
Step 03: We will set Control file upload in Session control type drop down
Step 04: We will provide SharePoint Online as the Activity source
Step 05: Add a filter for the policy
Step 06: We will provide Block option in Actions section with a proper message
That's all we have to do. Let's try this out
Friday, February 18, 2022
Video - Azure Active Directory and Role Based Access Control (RBAC)
Wednesday, September 8, 2021
Azure Privileged Identity Management (PIM) to grant Just in Time (JIT) access to resources
We always want to follow the least privilege security principle when granting permissions. Is role based access control alone sufficient to achieve this?
There are several challenges
- If permission given indefinitely without an expiry, it will cause a risk
- Such users may leave the organization
- Projects may end
- Having higher permission without a need at the moment is also a risk
- Credentials can be compromised at any moment
- You may do mistakes with higher permissions
Lat's take Contoso, which is a Financial organization which has its workloads in Microsoft Azure. John is a systems engineer who works in the same organization. Time to time the business requires to build new VM workloads and to modify existing VM resources. John should not have permanent contribute access due to prevailing audit and compliance requirements. What would be the solution?What we can do is to use PIM, and assign John as eligible for VM Contribute role. As per this solution John will not have permanent access to the resource. Whenever he needs the access, John would navigate to PIM console and requests for the desired access. He might be asked to provide a strong authentication (MFA) and approval might also be required. After the granted time window is elapsed his elevated privilege will be revoked.
Thursday, July 22, 2021
Azure Identity Protection to protect your credentials
With Azure Identity Protection (Azure AD P2 feature), Azure provides necessary precautions to protect and safeguard identities.
Some of the common risks with identities are
- Leaked credentials
- Malware linked IP addresses
- Unfamiliar sign-in properties
- and many more,
Following is the approach to configure Sign-in risk policy
Monday, April 20, 2020
Power BI - Consume on-premises data sources for external users with on-premises data gateway
In my previous post I illustrated how to use on-premises data gateway to expose on-premises data to Power BI.
I will show how external users can access those information.
Step 1: Ad external user to Azure Active Directory tenant
Step 2: Create a data source using the on-premises data gateway
Step 3: Create the data source in reports workspace
Step 4: Create test report
Step 5: Add permissions for external user
Let's try it out
By this way I was able to provide external user access to reports.