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
13
votes
7 answers

Deleting an Application's AppRole in Azure Active Directory

Removing an AppRole from an Application’s manifest produces a 400 Bad Request with the error Property value cannot be deleted unless it is disabled first. When I set the isEnabled property to false and then hit save, I get a successful saven…
11
votes
1 answer

How to 'Grant Permissions' Using Azure Active Directory PowerShell V2

I've scripted the creation of my Azure Active Directory Application using Azure Active Directory PowerShell V2 and am trying to use Delegated Permissions in my Single Page Application (SPA) using implicit flow to call an API with Application Roles…
9
votes
5 answers

How to create scope using Azure CLI (az ad app)

Using the Azure CLI 2.x, I cannot find a way to "add a Scope" under the expose an API section in Azure AD Portal. What I do see is if I pass the --identifier-uris when the app is created, the APP ID URI and a Scope get automatically set: `az ad…
6
votes
3 answers

Azure ad app - Updating manifest programmatically

I am trying to find a way to update an Azure Ad registered app's manifest via powershell, utilizing a json file. The Json file contains all of the app roles, and i would like to simple inject the App Roles: [] right into the App Role Brackets Is…
4
votes
1 answer

Connecting With Service Principal Using Connect-MSOLservice

I am trying to use a service principal I have created in AzureAD to connect via a PowerShell script. I created the SP successfully, created the key, and also created a self signed cert and associated it with the account. I know how to use…
4
votes
0 answers

Automate Connect-AzureAD Powershell

I created a script using powershell that connect to AzureAD and it was working fine using the following: Connect-AzureAD -TenantId $TenantId The sign in window pops up and I am able to successfully connect. However, I need to setup the script to…
3
votes
3 answers

Azure AD - how to set app manifest properties programatically (accessTokenAcceptedVersion to v2 and signInAudience)?

Is there a way to programatically via API to set the manifest property "accessTokenAcceptedVersion" to 2? This is required due to issue explained here - our code is expecting the new STS, fails with: WWW-Authenticate: Bearer…
3
votes
0 answers

Azure AD access token expire time configuration

I have two applications registered in AD tenant(lets say App A and App B). App A has API access to App B and it uses client credential flow to acquire access token. Access token expire time is 60mins default and Requirement is to set 10mins. I have…
3
votes
0 answers

Azure AD Multitenanted Apps How to get user emails from IssuerID and clientID

I have a SaaS system using Azure AD and multitenant access. This records the issuer, in the format https://sts.windows.net/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/ and an objectidentifier ID. The portal I'm using insists on seamless trials, so for trial…
3
votes
1 answer

Azure Graph 403 Authorization_RequestDenied using service principal from VSTS

I have a service principal that is used by VSTS to run an Azure Powershell script. The command i'm trying to call is Get-AzureRmRoleAssignment. I'm getting the following error message "Exception": { "Request": { "Method": "POST", …
3
votes
0 answers

AzureAD Module & PowerShell ISE - Get-AzureADUser not working in ISE

My coworker and myself I am facing a really odd issue with PowerShell ISE: The following code simply returns $null when executed via PowerShell ISE, but works fine in a regular PowerShell window or in VS Code: Import-Module…
thuld
  • 680
  • 3
  • 10
  • 29
2
votes
1 answer

How do I get all the details of an Azure AD computer object?

Calling Get-AzureADDevice gets me three attributes. How can I get the full list of attributes for the object? Specifically, when I use the GraphApi: https://graph.microsoft.com/v1.0/devices?$filter=startswith(operatingSystem,'Windows')` How can I…
2
votes
1 answer

Is there a way to switch between authentication contexts in the "AzureAD" powershell module the same way you can with the "Az" module?

I'm working on a script that involves jumping between two different user accounts in two different Azure tenants. With the Az powershell module, I can set different auth contexts using: Connect-AzAccount -ContextName "FirstContext" # interactive…
Benjin
  • 2,264
  • 2
  • 25
  • 50
2
votes
1 answer

Is it possible to update the SignInNames of already existing users in Azure AD using Powershell

Is it possible to update the AzureAD user's SignInNames using Powershell ? I tried to update it but it doesn't work out and gives a Bad Request error. No specific error is given. Let me know if that is possible! Thanks!
2
votes
2 answers

Add-AzureADApplicationPolicy: Error occurred while executing AddApplicationPolicy (Request_ResourceNotFound)

Using AzureADPreview (2.0.1.18) for Powershell i am trying to add a policy to an application: Add-AzureADApplicationPolicy -Id dc1b1cbf-356a-4d0a-a3b2-e7a0e3125aa2 -RefObjectId 36e8328a-17b5-4d64-a12f-dfac959c3b8b But i…
1
2 3 4