Azure API Management


AzureRM.ApiManagement cmdlets not working with login/add azure account


Trying to automate backups via runbooks/PowerShell and I get error;
Get-AzureRmApiManagement : Run Login-AzureRmAccount to login
The script uses the Add-AzureRMAccount –Credential $azureCredential to get access and works fine with storage and other requests. Tried switching to Login-AzureRMAccount and still same error.
Why do the cmdlets not work in automation runbook?
Also, when installing AzureRM.ApiManagement it requires the dependency AzureRm.profile (notice the lower case p). This clashes with the legit AzureRm.Profile already installed and already working with Add-AzureRMAccount. So to add to runbook I have to
install AzureRm.profile, install the AzureRM.ApiManagement, then uninstall AzureRm.profile. It seems a bit of a mess :(
Make sure that you are using correct version of AzureRm.Profile module in your Automation Account.
We have dependency on AzureRm.Profile
https://github.com/Azure/azure-powershell/blob/dev/src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1#L54
And yes, both Add-AzureRmAccount and Login-AzureRmAccount should work.
You need to use the Azure run as certificate in the automation account which is created when the automation account is provisioned.
Check the below link for more information Authenticate runbooks with an Azure Run As account.
https://docs.microsoft.com/en-us/azure/automation/automation-sec-configure-azure-runas-account
Is that specifically required by the AzureRM.ApiManagement module then? All the other code to create and update blob storage works fine
Make sure that you are using correct version of AzureRm.Profile module in your Automation Account.
We have dependency on AzureRm.Profile
https://github.com/Azure/azure-powershell/blob/dev/src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1#L54
And yes, both Add-AzureRmAccount and Login-AzureRmAccount should work.

Related Links

Adding/Removing Code Samples on Developer Portal
Access to the Program files path is denied.
Unable to Invoke wcf service, which was hosted on Azure Biztalk virtual machine throuth API
Limitations on URL Template?
Using Office 365 EWS API in Azure
Temporary Glitch or Bug?
API Management in new/old portal - working?
How to Authenticate the Resource manager api calls ?
Expose a REST API POST method as GET - not possible?
Does Azure API Management include WAF functionality?
find-and-replace policy statement's "to" attribute does not accept a zero length string
On Developer Portal Login, Redirect the User to Home
In Resource Manager Templates, Is it possible to iterate inside keys expecting an array of items (nested loops)
Azure Scheduler Rest API: Update Job - How to Remove advanced scheduling options? - Error: Schedules are not supported for recurrence unit 'Hour'
I am getting error when trying to add a user group from Active directory in the Azure API management product
How to create API using Azure API Management REST API in C#

Categories

MSDN
Visual Studio Development
Microsoft Office for D...
Visual Studio Design a...
JScript and Scripting
Microsoft ISV Communit...
Dynamics
Feedback and Discussions
Bing Maps
Expression
Archived Forums Visual...
Archived Forums W
Archived Forums X-Z
Announcements for all ...
C++ Standards, Extensi...
Parallel Computing in ...
Visual Studio General ...
Visual Studio Tools fo...
Visual Studio Editor
Visual Studio LightSwi...
Visual Studio Tools fo...
Visual Studio Graphics...
Store Engagement Frame...
XboxLiveDevelopment
Windows Desktop Develo...
Network Monitor
Windows Desktop Optica...
Application Security f...
Windows Desktop Search...
Windows Desktop Pro-Au...
Windows Hardware WDK a...
Windows Desktop Ribbon...
Message Analyzer
Office 365 for Developers
SharePoint 2013 - Deve...
SharePoint Legacy Vers...
Azure Storage
Azure Management Portal
Azure Active Directory
Azure App Service - We...
Azure Search
Azure Scheduler
Azure DocumentDB
Azure Key Vault
Azure Functions
Azure Blockchain
Azure Log Integration
.NET Framework Class L...
Common Language Runtim...
Claims based access pl...
Team Foundation Server...
BizTalk ESB Toolkit
JScript Native
Small Basic
SyncFx - Microsoft Syn...
Microsoft Device Emulator
.NET Compact Framework
SQL Server Data Access
SQL Service Broker
SQL Server High Availa...
Database Mirroring
SQL Server Migration
SQL Server Manageability
Windows Embedded Compa...
SQL Server 2012 Spatia...
Orchard - Help and Sup...
Office Live Basics, Es...
Windows Protocols
SQL Server Protocols
Microsoft Lync Persist...
Silverlight Installati...
Hosting and Streaming ...
Silverlight 4
Managed Extensibility ...
Silverlight for Window...
Expression Studio with...
Customer Care Framework
Surface Application De...
Retired SharePoint Ent...
Retired SharePoint Soc...
.NET Framework 4 Relea...
.NET Framework Network...
.NET Remoting and Runt...
Announcements about pr...
AppFabric Service and ...
Architecture Events
ASMX Web Services and ...
Building Windows Store...
Core Coding Experience...
Core Coding Experience...
Crystal Reports for Vi...
Direct3D 10
Dynamic Languages on .NET
ISV Community Days
Managed Extensibility ...
Microsoft Unified Comm...
MS-Build, Multi-Target...
Office Live Small Busi...
Office Live Small Busi...
Popfly Bugs and Sugges...
NUI API and Programmin...
Silverlight (formerly ...
Small Business Applica...
SyncFx - Technical Dis...
SQL Creation
SQL Server 2014 Data Q...
SQL Server 2014 Self-S...
SQL Server 2014 Integr...
Team Foundation Server...
Team Foundation Server...
Tailoring your Windows...
Visual Basic Express 2...
Visual Basic for Appli...
Visual C++ 2008 (Pre-r...
Visual C++ IDE
Visual Studio Async CTP
Visual Studio Editor i...
Visual Studio Gallery ...
Web Development in Vis...
Web Gadget Development
Windows Developer Prev...
Windows Live Data Deve...
Windows XP Wireless SDK
Tools for Windows Stor...
Mango Update (Archived)
Expression Blend for W...
Ad Revenue, Payout & T...
Azure N-Series Virtual...
Skype Web SDK
Microsoft R Open
Open source Developmen...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile