Questions tagged [azure-ad-powershell-v2]

The Azure Active Directory PowerShell V2 module is used to administer Azure Active Directory using the PowerShell scripting language.

The Azure Active Directory PowerShell V2 module is used to administer Azure Active Directory using the PowerShell scripting language.

58 questions
1
vote
1 answer

Error occurred while executing GetServicePrincipalOAuth2PermissionGrants

My requirement is to fetch permissions granted to Azure ad application from powershell. I have an application with few delegated permissions like this: I found Get-AzureADServicePrincipalOAuth2PermissionGrant command to achieve my scenario. But I…
1
vote
1 answer

Custom Powershell Module fails to import in Azure Funtion

I have an Azure function app that runs some Powershell and as part of it I am importing a custom Powershell module I wrote. I had tested it and it worked, but when I went to test it again it no longer imports the module correctly, it instead gives…
1
vote
1 answer

Authentication_Unauthorized while fetching list of applications in AAD

I am trying to get list of applications registered in AAD via PowerShell. I got into my tenant successfully using Connect-AzureAD. But when I'm running Get-AzureADApplication, I'm getting error like below: Get-AzureADApplication : Error occurred…
Mahesh3143
  • 15
  • 5
1
vote
1 answer

Unable to fetch ID of SharePoint API permissions

I am trying to fetch GUID of ProjectWebApp.FullControl and ProjectWebAppReporting.Read and add them to Sharepoint Api group. I tried using below command to find IDs: $result = Get-AzureADServicePrincipal -All $true | ? { $_.DisplayName -eq "Office…
Sindhu M S
  • 15
  • 3
1
vote
2 answers

Invalid value specified for property 'groupTypes' of resource 'Group'

I am new to Azure and I am trying to create a dynamic Azure Ad group through PowerShell by following below cmdlet: New-AzureADMSGroup -DisplayName "GroupName" -Description "Des" -MailEnabled $False -MailNickname "Mail" -SecurityEnabled $True …
1
vote
2 answers

New-AzureADServiceAppRoleAssignment throws Error when use it without Global Admin account

I am using .Net Core App with hosting it on Azure Portal. Now at some place I need to use Get the detail of logged in User (Active Directory user) in the application. So for that I am using Microsoft Graph API. So to setup this permission I am using…
1
vote
3 answers

Get all users for the Azure AD group in Azure CLI - 100 limit issue

I'm looking for a way to retrieve information about all users that belong to a particular group and store the results in CSV. So, I use the following Azure AD command for the purpose: Get-AzureADGroupMember -ObjectId "xxx" | get-azureaduser |…
spoonboy
  • 2,570
  • 5
  • 32
  • 56
1
vote
1 answer

How can I read the mobile value from a B2C user record and transform it to a strongAuthenticationPhoneNumber?

I have the need to create Azure B2C user accounts programmatically. In a separate user data store I hold pertinent information about the users I need to set up in B2C including their mobile phone number, which we've already been communicating with…
1
vote
1 answer

Updating Multiple Users ADGroup by EmployeeID

I'm trying to update AzureADGroupMember for multiple users in a CSV File by Employee. This is what I've got assisted with, but looking to have it update by UPN instead of EmployeeID. This was the successful code that updates ADGroupMember by…
1
vote
1 answer

Updating Multiple Users to ADGroup

I'm trying to update AzureADGroupMember for multiple users in a CSV File by UPN. This is what I've came across and attempted: $users = Import-csv "C:\Temp\testgroup2.csv" $users | ForEach-Object{ Add-AzureGroupADGroupMember -ObjectId…
1
vote
0 answers

Error while importing MSOnline module through SSH

I am getting the below error while SSH'ing into a windows server - 2008 R2 SP1 and issuing the command - "Import-Module MSOnline" Import-Module : Could not load file or assembly…
Jesvin
  • 11
  • 4
1
vote
1 answer

How to add Extension Properties for Azure-AD Device Objects using PowerShell?

I want to add extension properties for device objects in Azure AD using Power-Shell. I have search a lot but found examples for only User objects.I have written a script and its successful for User Objects but am not be able to set extension…
1
vote
1 answer

Get-MsolUserRole Azure AD V2 cmdlet equivalent

I currently try to migrate an existing PowerShell script that uses the old MSOnline PowerShell module to the AzureAD (V2) module. I am able to replace most of the cmdlets but I don't find a replacement for the Get-MsolUserRole cmdlet to retrieve…
Martin Brandl
  • 56,134
  • 13
  • 133
  • 172
1
vote
2 answers

Power Shell: Using variables when trying to add users to group

I have been trying to find a way to bulk add users to a group from a variable. I create my variables. Test my variables. And then when I use them, the system interprets them in a way I didn't expect. Has anyone figured out how to best automate…
C_Harb
  • 11
  • 2
1
vote
0 answers

Provide permissions on AAD to Automation Account's AAD application from powershell

I have a bit of a complicated requirement and so, I'm sorry if the title sounds vague. But here's what I'm trying to do. So I have an automation account let's say AutomationAccount_Parent in subscription_01. This has a runbook that creates a new…