Skip to content

Latest commit

 

History

History
80 lines (49 loc) · 5.74 KB

README.md

File metadata and controls

80 lines (49 loc) · 5.74 KB

Azure AD Graph

This PowerShell script lists applications in your tenant that use permissions for Azure AD Graph. Azure AD Graph will be retired soon.

If you have applications that use Azure AD Graph permissions and that actively call Azure AD Graph, follow the steps in the App migration planning checklist to migrate your applications using Azure AD Graph to Microsoft Graph.

⚠️ Azure AD Graph is deprecated. To avoid loss of functionality, migrate your applications to Microsoft Graph as soon as possible.

Prerequisites

You will need PowerShell Desktop edition to run this script. If you're on a Mac or if you use Azure Cloud Shell, you can obtain the same list of applications using the Azure portal by following these steps.

⚠️ This script does not capture all instances of Azure AD Graph usage. If you have applications that have been granted permissions or app role assignments using the methods listed below they will not be included in the generated report.

  • App has not been granted delegated permissions for Azure AD Graph, but calls Azure AD Graph (e.g. relying on delegated permissions granted for Microsoft Graph for authorization).
  • App has not been granted app role assignments for Azure AD Graph, but calls Azure AD Graph (e.g. relying on directory role assignments and/or ownership for direct authorization).
  • App has been granted delegated permissions for Azure AD Graph but has already migrated to Microsoft Graph (e.g. relying on delegated permissions granted previously for Azure AD Graph, which are considered granted for Microsoft Graph as well).

Download and save the Get-AzureADGraphApps.ps1 script file to your device.

Note:
This script has a dependency on the Azure AD PowerShell module. When the script is run it will automatically install the dependant module if it is not already installed.

Usage

The command below will create a csv of all the apps in the tenant that rely on the Azure AD Graph.

Connect-AzureAD
.\Get-AzureADGraphApps.ps1 | Export-Csv .\aadgraphapps.csv -NoTypeInformation

FAQs

Q: I use a Mac/Azure Cloud Shell. Can I run this script?

A: No, but you can fetch the same list of applications (that use Azure Active Directory Graph permissions) using the Azure portal by following these steps.

Q: What permission do I need to run this script?

A: This script can be run by any user in the tenant and does not require a privileged Azure AD role.

Q: How long will the script take to complete?

A: The duration depends on the number of service principals in the tenant. A small tenant with less than 1000 service principals will usually complete in a few minutes. Larger tenants can take up to 1-2 hours and very large tenants that have more than 100,000 service principals can take 10-24 hours to run.

Q: Can I use Azure AD Graph permissions to call Microsoft Graph?

A: No, use the corresponding Microsoft Graph permissions. For more information, see Review app registration, permissions, and consent.

Q: Does this script automatically remove my Azure AD Graph permissions in favor of Microsoft Graph permissions?

A: No, this script gives you a list of applications that have Azure AD Graph permissions. You should review these applications, grant them the corresponding Microsoft Graph permissions, migrate their Azure AD Graph API calls to Microsoft Graph, and then remove these Azure AD Graph permissions. Our App migration planning checklist can help you with this process.

Support

Please see SUPPORT.md for support options.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.